Class SqliteQueryProvider
PVT-backed terminal aggregations for free SQLite. Generates the
aggregate SQL via the server-side compiler pvt_build_aggregate_sql
(free PVT v2 module) and executes the produced statement client-side,
wrapping the single result row with row_to_json to materialize
in a single round-trip after the build step.
Overrides the FilterExpression-typed virtual methods on the base provider.
Legacy facet-JSON overloads stay on the base type for dialects without
the PVT module (e.g. MSSql).
public class SqliteQueryProvider : QueryProviderBase, IRedbQueryProvider
Inheritance
Implements
Derived
Inherited Members
Methods
ExecuteAggregateAsync(long, string, AggregateFunction, FilterExpression?, CancellationToken)
Single-aggregate path. Delegates to ExecuteAggregateBatchAsync(long, IEnumerable<AggregateRequest>, FilterExpression?)
public override Task<decimal?> ExecuteAggregateAsync(long schemeId, string fieldPath, AggregateFunction function, FilterExpression? filter, CancellationToken cancellationToken = default)
ExecuteAggregateBatchAsync(long, IEnumerable<AggregateRequest>, FilterExpression?, CancellationToken)
Batch aggregate path: builds aggregations JSON, asks
public override Task<AggregateResult> ExecuteAggregateBatchAsync(long schemeId, IEnumerable<AggregateRequest> requests, FilterExpression? filter, CancellationToken cancellationToken = default)
ExecuteAggregateBatchAsync(long, IEnumerable<AggregateRequest>, string?, CancellationToken)
Batch aggregate path with pre-built facet-JSON filter. Same PVT pipeline
public override Task<AggregateResult> ExecuteAggregateBatchAsync(long schemeId, IEnumerable<AggregateRequest> requests, string? filterJson = null, CancellationToken cancellationToken = default)
ExecuteArrayGroupQueryAsync(ArrayGroupQuery, CancellationToken)
GroupByArray on the free SQLite provider: pvt_build_array_groupby_sql of the extension builds the
public override Task<JsonDocument> ExecuteArrayGroupQueryAsync(ArrayGroupQuery query, CancellationToken cancellationToken = default)
ExecuteGroupedAggregateAsync(long, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, FilterExpression?, string?, CancellationToken)
Performs GroupBy aggregation with FilterExpression (Pro version).
public override Task<JsonDocument?> ExecuteGroupedAggregateAsync(long schemeId, IEnumerable<GroupFieldRequest> groupFields, IEnumerable<AggregateRequest> aggregations, FilterExpression? filter, string? havingJson = null, CancellationToken cancellationToken = default)
ExecuteGroupedAggregateAsync(long, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, string?, string?, CancellationToken)
GroupBy aggregation with a facet-JSON filter, built by the provider through its v2-pvt module. The base asked
public override Task<JsonDocument?> ExecuteGroupedAggregateAsync(long schemeId, IEnumerable<GroupFieldRequest> groupFields, IEnumerable<AggregateRequest> aggregations, string? filterJson = null, string? havingJson = null, CancellationToken cancellationToken = default)
ExecuteGroupedWindowQueryAsync(long, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, FilterExpression?, string?, CancellationToken)
Execute GroupBy with Window Functions with FilterExpression.
public override Task<JsonDocument?> ExecuteGroupedWindowQueryAsync(long schemeId, IEnumerable<GroupFieldRequest> groupFields, IEnumerable<AggregateRequest> aggregations, IEnumerable<WindowFuncRequest> windowFuncs, IEnumerable<WindowFieldRequest> partitionBy, IEnumerable<WindowOrderRequest> orderBy, FilterExpression? filter, string? havingJson = null, CancellationToken cancellationToken = default)
ExecuteGroupedWindowQueryAsync(long, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, string?, CancellationToken)
Execute GroupBy with Window Functions. A provider that supports it overrides this; one that does not refuses
public override Task<JsonDocument?> ExecuteGroupedWindowQueryAsync(long schemeId, IEnumerable<GroupFieldRequest> groupFields, IEnumerable<AggregateRequest> aggregations, IEnumerable<WindowFuncRequest> windowFuncs, IEnumerable<WindowFieldRequest> partitionBy, IEnumerable<WindowOrderRequest> orderBy, string? filterJson = null, string? havingJson = null, CancellationToken cancellationToken = default)
ExecuteWindowQueryAsync(long, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, FilterExpression?, string?, int?, int?, CancellationToken)
Execute window query with FilterExpression (Pro version).
public override Task<JsonDocument?> ExecuteWindowQueryAsync(long schemeId, IEnumerable<WindowFieldRequest> selectFields, IEnumerable<WindowFuncRequest> windowFuncs, IEnumerable<WindowFieldRequest> partitionBy, IEnumerable<WindowOrderRequest> orderBy, FilterExpression? filter, string? frameJson = null, int? take = null, int? skip = null, CancellationToken cancellationToken = default)
ExecuteWindowQueryAsync(long, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, string?, int?, int?, CancellationToken)
A query with window functions and a facet-JSON filter, built by the provider through its v2-pvt module. The
public override Task<JsonDocument?> ExecuteWindowQueryAsync(long schemeId, IEnumerable<WindowFieldRequest> selectFields, IEnumerable<WindowFuncRequest> windowFuncs, IEnumerable<WindowFieldRequest> partitionBy, IEnumerable<WindowOrderRequest> orderBy, string? filterJson = null, string? frameJson = null, int? take = null, int? skip = null, CancellationToken cancellationToken = default)
GetAggregateSqlPreviewAsync<TProps, TResult>(QueryContext<TProps>, Expression<Func<RedbObject<TProps>, TResult>>, CancellationToken)
SQL preview of an AggregateAsync selector: the aggregate statement pvt_build_aggregate_sql compiles for the
public override Task<string> GetAggregateSqlPreviewAsync<TProps, TResult>(QueryContext<TProps> context, Expression<Func<RedbObject<TProps>, TResult>> selector, CancellationToken cancellationToken = default) where TProps : class, new()
GetArrayGroupQuerySqlAsync(ArrayGroupQuery, CancellationToken)
SQL of ; see there.
public override Task<string> GetArrayGroupQuerySqlAsync(ArrayGroupQuery query, CancellationToken cancellationToken = default)
GetGroupBySqlPreviewAsync(long, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, FilterExpression?, string?, CancellationToken)
FilterExpression overload of GetGroupBySqlPreviewAsync(long, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, string, string).
public override Task<string> GetGroupBySqlPreviewAsync(long schemeId, IEnumerable<GroupFieldRequest> groupFields, IEnumerable<AggregateRequest> aggregations, FilterExpression? filter, string? havingJson = null, CancellationToken cancellationToken = default)
GetGroupBySqlPreviewAsync(long, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, string?, string?, CancellationToken)
Returns the inner SELECT compiled by pvt_build_groupby_sql for the
public override Task<string> GetGroupBySqlPreviewAsync(long schemeId, IEnumerable<GroupFieldRequest> groupFields, IEnumerable<AggregateRequest> aggregations, string? filterJson, string? havingJson = null, CancellationToken cancellationToken = default)
GetGroupedWindowSqlPreviewAsync(long, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, FilterExpression?, string?, CancellationToken)
SQL preview for GroupBy + Window query with FilterExpression.
public override Task<string> GetGroupedWindowSqlPreviewAsync(long schemeId, IEnumerable<GroupFieldRequest> groupFields, IEnumerable<AggregateRequest> aggregations, IEnumerable<WindowFuncRequest> windowFuncs, IEnumerable<WindowFieldRequest> partitionBy, IEnumerable<WindowOrderRequest> orderBy, FilterExpression? filter, string? havingJson = null, CancellationToken cancellationToken = default)
GetGroupedWindowSqlPreviewAsync(long, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, string?, CancellationToken)
SQL preview for GroupBy + Window query. A provider that supports it overrides this; one that does not refuses
public override Task<string> GetGroupedWindowSqlPreviewAsync(long schemeId, IEnumerable<GroupFieldRequest> groupFields, IEnumerable<AggregateRequest> aggregations, IEnumerable<WindowFuncRequest> windowFuncs, IEnumerable<WindowFieldRequest> partitionBy, IEnumerable<WindowOrderRequest> orderBy, string? filterJson = null, string? havingJson = null, CancellationToken cancellationToken = default)
GetWindowSqlPreviewAsync(long, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, string?, int?, int?, CancellationToken)
SQL preview for window query.
public override Task<string> GetWindowSqlPreviewAsync(long schemeId, IEnumerable<WindowFieldRequest> selectFields, IEnumerable<WindowFuncRequest> windowFuncs, IEnumerable<WindowFieldRequest> partitionBy, IEnumerable<WindowOrderRequest> orderBy, string? filterJson = null, string? frameJson = null, int? take = null, int? skip = null, CancellationToken cancellationToken = default)