Class RedbGroupedQueryable<TKey, TProps>
Implementation of REDB grouped queries
public class RedbGroupedQueryable<TKey, TProps> : IRedbGroupedQueryable<TKey, TProps> where TProps : class, new()
Inheritance
Implements
Methods
CountAsync(CancellationToken)
Returns group count.
public Task<int> CountAsync(CancellationToken cancellationToken = default)
Having(Expression<Func<IRedbGrouping<TKey, TProps>, bool>>)
Filter groups by a predicate over aggregates (SQL HAVING).
public IRedbGroupedQueryable<TKey, TProps> Having(Expression<Func<IRedbGrouping<TKey, TProps>, bool>> predicate)
SelectAsync<TResult>(Expression<Func<IRedbGrouping<TKey, TProps>, TResult>>, CancellationToken)
Executes projection with aggregations for each group.
public Task<List<TResult>> SelectAsync<TResult>(Expression<Func<IRedbGrouping<TKey, TProps>, TResult>> selector, CancellationToken cancellationToken = default)
SelectAsync<TResult>(Expression<Func<IRedbGrouping<TKey, TProps>, TResult>>)
Executes projection with aggregations for each group.
public Task<List<TResult>> SelectAsync<TResult>(Expression<Func<IRedbGrouping<TKey, TProps>, TResult>> selector)
ToSqlStringAsync<TResult>(Expression<Func<IRedbGrouping<TKey, TProps>, TResult>>, CancellationToken)
Returns SQL string that will be executed for this GroupBy query.
public Task<string> ToSqlStringAsync<TResult>(Expression<Func<IRedbGrouping<TKey, TProps>, TResult>> selector, CancellationToken cancellationToken = default)
ToSqlStringAsync<TResult>(Expression<Func<IRedbGrouping<TKey, TProps>, TResult>>)
Returns SQL string that will be executed for this GroupBy query.
public Task<string> ToSqlStringAsync<TResult>(Expression<Func<IRedbGrouping<TKey, TProps>, TResult>> selector)
WithWindow(Action<IGroupedWindowSpec<TKey, TProps>>)
Apply window functions to grouped results: the window runs over the groups that pass Having.
public IGroupedWindowedQueryable<TKey, TProps> WithWindow(Action<IGroupedWindowSpec<TKey, TProps>> windowConfig)
Constructors
RedbGroupedQueryable(IRedbQueryProvider, long, FilterExpression?, Expression, bool)
Constructor with FilterExpression (Pro version - direct access to filter).
RedbGroupedQueryable(IRedbQueryProvider, long, string?, Expression, bool)
Constructor with filterJson (Free version compatibility).