API Reference
Обзор документации REDB API. Выберите пространство имён или тип в дереве слева, или кликните по элементам ниже.
Результаты поиска: Query
Очистить
appExt
redb.Core.Utils
Filter<T>(IQueryable<T>, string, object)
Filter IQueryable by property name dynamically.
ArrayGroupQuery
redb.Core.Query.Grouping
ArrayGroupSqlBuilder
redb.Core.Pro.Query
CompiledPvtQuery
redb.Core.Pro.Query.Models
CompiledPvtQuery(string, IReadOnlyList<FieldInfo>, string)
Compiled PVT query with SQL template and metadata.
CompiledQuery
redb.Core.Query.Models
CompiledQuery(string, IReadOnlyList<FieldInfo>, string)
Compiled SQL query with template and metadata.
E096_TreeQuery
redb.Examples.Examples
E096_TreeQuery_ef
redb.Examples.ExamplesEf
E097_TreeQueryRoots
redb.Examples.Examples
E097_TreeQueryRoots_ef
redb.Examples.ExamplesEf
E098_TreeQueryLeaves
redb.Examples.Examples
E098_TreeQueryLeaves_ef
redb.Examples.ExamplesEf
E099_TreeQueryLevel
redb.Examples.Examples
E099_TreeQueryLevel_ef
redb.Examples.ExamplesEf
E105_TreeQueryWithRoot
redb.Examples.Examples
E105_TreeQueryWithRoot_ef
redb.Examples.ExamplesEf
E106_TreeQueryChildrenOf
redb.Examples.Examples
E106_TreeQueryChildrenOf_ef
redb.Examples.ExamplesEf
E107_TreeQueryMultiRoot
redb.Examples.Examples
E107_TreeQueryMultiRoot_ef
redb.Examples.ExamplesEf
E160_TreeQueryExpressions
redb.Examples.Examples
E160_TreeQueryExpressions_ef
redb.Examples.ExamplesEf
E173_TreeQueryGroupBy
redb.Examples.Examples
E173_TreeQueryGroupBy_ef
redb.Examples.ExamplesEf
E174_TreeQueryWindow
redb.Examples.Examples
E174_TreeQueryWindow_ef
redb.Examples.ExamplesEf
E175_TreeQueryGroupByWindow
redb.Examples.Examples
E175_TreeQueryGroupByWindow_ef
redb.Examples.ExamplesEf
ExpressionSqlCache
redb.Core.Query.Caching
Set(string, CompiledQuery)
Sets cached query.
TryGet(string, out CompiledQuery?)
Tries to get cached query.
FacetFilterBuilder
redb.Core.Query
BuildQueryParameters(int?, int?)
Build query parameters (limit, offset).
GroupedWindowedQueryable<TKey, TProps>
redb.Core.Query.Grouping
GroupedWindowedQueryable(IRedbQueryProvider, long, Expression, GroupedWindowSpec<TKey, TProps>, FilterExpression?)
Constructor with FilterExpression (Pro version).
GroupedWindowedQueryable(IRedbQueryProvider, long, Expression, GroupedWindowSpec<TKey, TProps>, string?, FilterExpression?, string?)
Constructor for a GroupBy with HAVING: the window runs over the groups that pass it.
GroupedWindowedQueryable(IRedbQueryProvider, long, Expression, GroupedWindowSpec<TKey, TProps>, string?)
Constructor with filterJson (legacy compatibility).
IdSubqueryExpression
redb.Core.Pro.Query
IdSubqueryExpression(string)
"The object id is one of those this statement selects": the condition a Pro statement that aggregate...
IFacetFilterBuilder
redb.Core.Query.FacetFilters
BuildQueryParameters(int?, int?)
Build query parameters (limit, offset).
IGroupedWindowedQueryable<TKey, TProps>
redb.Core.Query.Grouping
IOrderedRedbQueryable<TProps>
redb.Core.Query
IQueryableProvider
redb.Core.Providers
Query<TProps>()
Create type-safe query by type (synchronous).
Query<TProps>(IRedbUser)
Create type-safe query by type with specified user (synchronous).
TreeQuery<TProps>()
Create type-safe tree query by type (synchronous).
TreeQuery<TProps>(IEnumerable<IRedbObject>, int?)
Create tree query limited to subtrees of object list (synchronous).
TreeQuery<TProps>(IEnumerable<IRedbObject>, IRedbUser, int?)
Create tree query limited to subtrees of object list with specified user (synchronous).
TreeQuery<TProps>(IEnumerable<long>, int?)
Create tree query limited to subtrees by ID list (synchronous).
TreeQuery<TProps>(IEnumerable<long>, IRedbUser, int?)
Create tree query limited to subtrees by ID list with specified user (synchronous).
TreeQuery<TProps>(IRedbObject?, int?)
Create tree query limited to subtree (synchronous).
TreeQuery<TProps>(IRedbObject?, IRedbUser, int?)
Create tree query limited to subtree with specified user (synchronous).
TreeQuery<TProps>(IRedbUser)
Create type-safe tree query by type with specified user (synchronous).
TreeQuery<TProps>(long, int?)
Create tree query limited to subtree (synchronous, by ID).
TreeQuery<TProps>(long, IRedbUser, int?)
Create tree query limited to subtree with specified user (synchronous, by ID).
IRedbConnection
redb.Core.Data
Query<T>(string, params object[])
Synchronous : runs on the calling thread down to ADO.NET.
QueryAsync<T>(string, object[], CancellationToken)
Cancellable form: parameters as an explicit array (params cannot precede ct).
QueryAsync<T>(string, params object[])
Execute SQL query and return list of mapped objects.
QueryFirstOrDefault<T>(string, params object[])
Synchronous : runs on the calling thread down to ADO.NET.
QueryFirstOrDefaultAsync<T>(string, object[], CancellationToken)
Cancellable form.
QueryFirstOrDefaultAsync<T>(string, params object[])
Execute SQL query and return first result or null.
QueryScalarListAsync<T>(string, object[], CancellationToken)
Cancellable form.
QueryScalarListAsync<T>(string, params object[])
Execute SQL query and return list of scalar values (first column only).
IRedbContext
redb.Core.Data
Query<T>(string, params object[])
Synchronous on the calling thread.
QueryAsync<T>(string, object[], CancellationToken)
Cancellable form: parameters as an explicit array (params cannot precede ct).
QueryAsync<T>(string, params object[])
Execute SQL query and return list of mapped objects.
QueryFirstOrDefault<T>(string, params object[])
Synchronous on the calling thread.
QueryFirstOrDefaultAsync<T>(string, object[], CancellationToken)
Cancellable form.
QueryFirstOrDefaultAsync<T>(string, params object[])
Execute SQL query and return first result or null.
QueryRowsAsJsonAsync(string, object[], CancellationToken)
The rows of sql as a JSON array of objects keyed by column name, NULL values included;
QueryScalarListAsync<T>(string, object[], CancellationToken)
Cancellable form.
QueryScalarListAsync<T>(string, params object[])
Execute SQL query and return list of scalar values (first column only).
IRedbGroupedQueryable<TKey, TProps>
redb.Core.Query.Grouping
IRedbProjectedQueryable<TResult>
redb.Core.Query
IRedbQueryable<TProps>
redb.Core.Query
IRedbQueryProvider
redb.Core.Query
CreateQuery<TProps>(long, long?, bool)
Create new query for specified scheme.
ExecuteArrayGroupQueryAsync(ArrayGroupQuery, CancellationToken)
Runs a grouping over the elements of an array (GroupByArray, with or without a window over the group...
ExecuteGroupedWindowQueryAsync(long, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, FilterExpression?, string?, CancellationToken)
Execute GroupBy with Window Functions with FilterExpression (Pro version).
ExecuteGroupedWindowQueryAsync(long, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, FilterExpression?)
Execute GroupBy with Window Functions with FilterExpression (Pro version).
ExecuteGroupedWindowQueryAsync(long, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, string?, CancellationToken)
Execute GroupBy with Window Functions (ranking, running totals on aggregated data).
ExecuteGroupedWindowQueryAsync(long, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?)
Execute GroupBy with Window Functions (ranking, running totals on aggregated data).
ExecuteWindowQueryAsync(long, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, FilterExpression?, string?, int?, int?, CancellationToken)
Execute query with window functions with FilterExpression (Pro version).
ExecuteWindowQueryAsync(long, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, FilterExpression?, string?, int?, int?)
Execute query with window functions with FilterExpression (Pro version).
ExecuteWindowQueryAsync(long, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, string?, int?, int?, CancellationToken)
Execute query with window functions (SQL function query_with_window).
ExecuteWindowQueryAsync(long, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, string?, int?, int?)
Execute query with window functions (SQL function query_with_window).
GetArrayGroupQuerySqlAsync(ArrayGroupQuery, CancellationToken)
The SQL runs for the same request, for ToSqlStringAsync.
GetFilterJsonAsync<TProps>(QueryContext<TProps>, CancellationToken)
Returns the JSON filter that will be sent to SQL function (for diagnostics)
GetFilterJsonAsync<TProps>(QueryContext<TProps>)
Returns the JSON filter that will be sent to SQL function (for diagnostics)
GetSqlPreviewAsync<TProps>(QueryContext<TProps>, CancellationToken)
Get SQL query for debugging (analogous to ToQueryString in EF Core).
GetSqlPreviewAsync<TProps>(QueryContext<TProps>)
Get SQL query for debugging (analogous to ToQueryString in EF Core).
IRedbWindowedQueryable<TProps>
redb.Core.Query.Window
ISqlDialect
redb.Core.Query
Query_AggregateArrayGroupedSql()
SQL for array grouped aggregation.
Query_AggregateBatchPreviewSql()
SQL for aggregate batch preview.
Query_AggregateBatchSql()
SQL for aggregate batch function.
Query_AggregateFieldSql()
SQL for aggregate field.
Query_AggregateGroupedSql()
SQL for grouped aggregation.
Query_BigintArrayCast()
Bigint array cast. PostgreSQL: "::bigint[]"
Query_BuildPvtProjectionSqlFunction()
Bare SQL function name returning the projection SELECT string.
Query_BuildPvtProjectionSqlInvocation(long, int?, int, int, bool, string, long[]?, bool)
Builds the full SELECT statement that invokes
Query_BuildPvtSqlFunction()
Bare SQL function name returning the inner _id-list SQL string.
Query_BuildPvtSqlInvocation(long, int?, int, int, bool, string, long[]?, bool)
Builds the full SELECT statement that invokes pvt_build_query_sql.
Query_CheckPermissionSql()
SQL for checking user permission on object.
Query_CountTemplate()
SQL template for COUNT query. Params: functionName
Query_GetDescendantIdsFromAncestorsSql(string, int)
SQL for the ids of the descendants of the given objects, down to depthLimit levels below them
Query_GetIdsWithAncestorsSql(string)
SQL for getting all IDs with their ancestors using recursive CTE.
Query_GetParentIdsFromDescendantsSql(string, int)
SQL for getting parent IDs from descendant IDs using recursive CTE.
Query_HasAncestorNormalSql(string)
SQL for HasAncestor normal search - extracts IDs from JSON result.
Query_HasAncestorTreeSql(string)
SQL for HasAncestor tree search - extracts IDs from JSON result.
Query_HasDescendantSql(string)
SQL for HasDescendant search - extracts IDs from JSON result.
Query_JsonCast()
JSON cast expression for the database.
Query_LoadObjectsByIdsSql(string, int)
SQL for loading objects by IDs as JSON.
Query_ProjectionByIdsTemplate(string)
SQL for projection by structure IDs query.
Query_ProjectionByPathsTemplate()
SQL for projection by paths query.
Query_PvtModuleCompatFunction()
Bare SQL function name returning what a deployed module still serves: '<oldest package module versio...
Query_PvtModuleVersionFunction()
Bare SQL function name returning the deployed v2-pvt module
Query_PvtRequiredVersion()
Semver string the shipped v2-pvt bundle for this dialect declares.
Query_SearchFullTemplate()
SQL template for full search query with distinct and facets. Params: functionName
Query_SearchObjectsBaseFunction()
Name of the search function for objects base fields only (lazy loading).
Query_SearchObjectsFunction()
Name of the search function for objects with facets (eager loading).
Query_SearchObjectsProjectionByIdsFunction()
Name of the search function with projection by IDs.
Query_SearchObjectsProjectionByPathsFunction()
Name of the search function with projection by paths.
Query_SearchObjectsSimpleSql()
SQL for simple search objects (used in distinct).
Query_SearchTemplate()
SQL template for search query result. Params: functionName
Query_SearchTreeObjectsBaseFunction()
Name of the tree search function base fields only (lazy loading).
Query_SearchTreeObjectsFunction()
Name of the tree search function (eager loading).
Query_SearchWithDistinctTemplate()
SQL template for search query with distinct. Params: functionName
Query_SqlPreviewBaseFunction()
SQL preview function name for base (lazy loading) search.
Query_SqlPreviewFunction()
SQL preview function name for regular search.
Query_SqlPreviewTemplate()
SQL for SQL preview function.
Query_TextArrayCast()
Text array cast. PostgreSQL: "::text[]"
Query_TreeCountNormalSql(string)
SQL for tree count query (normal search).
Query_TreeCountWithParentIdsSql(string)
SQL for tree COUNT with parent_ids array.
Query_TreeSearchNormalSql(string)
SQL for tree search query (normal search).
Query_TreeSearchWithParentIdsSql(string)
SQL for tree search with multiple parent IDs.
Query_TreeSqlPreviewBaseFunction()
SQL preview function name for tree base (lazy loading) search.
Query_TreeSqlPreviewFunction()
SQL preview function name for tree search.
Query_TreeSqlPreviewTemplate(string)
SQL for tree SQL preview.
Query_WindowSql()
SQL for window query.
Query_WrapPvtProjectionRowsAsJson(string, bool)
Wraps the projection inner SQL into a result-set of JSON rows
Query_WrapPvtWithCount(string)
Wraps the inner _id-list SQL with COUNT(*).
Query_WrapPvtWithExists(string)
Wraps the inner _id-list SQL with EXISTS(...).
Query_WrapPvtWithObjectJson(string, int)
Wraps the inner _id-list SQL with the system materializer to
WrapSubquery(string, string)
Subquery wrapper: (subquery) AS alias
ITreeQueryProvider
redb.Core.Query
CreateTreeQuery<TProps>(long, long?, bool, long?, int?)
Create tree query with hierarchical constraint support.
ExecuteTreeArrayGroupQueryAsync<TProps>(TreeQueryContext<TProps>, ArrayGroupQuery, CancellationToken)
Runs a grouping over the elements of an array for the objects of a subtree: the objects the tree con...
ExecuteTreeGroupedAggregateAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, string?, CancellationToken)
Execute GROUP BY aggregation with tree context (CTE for tree traversal).
ExecuteTreeGroupedAggregateAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>)
Execute GROUP BY aggregation with tree context (CTE for tree traversal).
ExecuteTreeGroupedWindowQueryAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, CancellationToken)
Execute GroupBy + Window Functions with tree context.
ExecuteTreeGroupedWindowQueryAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>)
Execute GroupBy + Window Functions with tree context.
ExecuteTreeWindowQueryAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, CancellationToken)
Execute Window Functions query with tree context (CTE for tree traversal).
ExecuteTreeWindowQueryAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?)
Execute Window Functions query with tree context (CTE for tree traversal).
GetTreeArrayGroupQuerySqlAsync<TProps>(TreeQueryContext<TProps>, ArrayGroupQuery, CancellationToken)
The SQL runs for the same request.
GetTreeGroupBySqlPreviewAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, string?, CancellationToken)
Get SQL preview for tree GROUP BY query (for debugging).
GetTreeGroupBySqlPreviewAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>)
Get SQL preview for tree GROUP BY query (for debugging).
GetTreeGroupedWindowSqlPreviewAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, CancellationToken)
Get SQL preview for tree GroupBy + Window query.
GetTreeGroupedWindowSqlPreviewAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>)
Get SQL preview for tree GroupBy + Window query.
GetTreeWindowSqlPreviewAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, CancellationToken)
Get SQL preview for tree window query (for debugging).
GetTreeWindowSqlPreviewAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?)
Get SQL preview for tree window query (for debugging).
MsSqlDialect
redb.MSSql.Sql
Query_AggregateArrayGroupedSql()
SQL for array grouped aggregation.
Query_AggregateBatchPreviewSql()
SQL for aggregate batch preview.
Query_AggregateBatchSql()
SQL for aggregate batch function.
Query_AggregateFieldSql()
SQL for aggregate field.
Query_AggregateGroupedSql()
SQL for grouped aggregation.
Query_BigintArrayCast()
Bigint array cast. PostgreSQL: "::bigint[]"
Query_BuildPvtProjectionSqlFunction()
Bare SQL function name returning the projection SELECT string.
Query_BuildPvtProjectionSqlInvocation(long, int?, int, int, bool, string, long[]?, bool)
Builds the full SELECT statement that invokes
Query_BuildPvtSqlFunction()
Bare SQL function name returning the inner _id-list SQL string.
Query_BuildPvtSqlInvocation(long, int?, int, int, bool, string, long[]?, bool)
Builds the full SELECT statement that invokes pvt_build_query_sql.
Query_CheckPermissionSql()
SQL for checking user permission on object.
Query_CountTemplate()
MSSQL uses EXEC and OPENJSON for JSON parameters.
Query_GetDescendantIdsFromAncestorsSql(string, int)
MSSQL: the descendants of the given objects down to depthLimit levels below them (WITH, without RECU...
Query_GetIdsWithAncestorsSql(string)
MSSQL: Get all IDs with their ancestors using recursive CTE.
Query_GetParentIdsFromDescendantsSql(string, int)
MSSQL: WITH (without RECURSIVE) for traversing ancestors.
Query_HasAncestorNormalSql(string)
HasAncestor with normal function (6 params) - MSSQL captures EXEC result in temp table.
Query_HasAncestorTreeSql(string)
HasAncestor with tree function (8 params) - MSSQL captures EXEC result in temp table.
Query_HasDescendantSql(string)
HasDescendant with normal function (6 params) - MSSQL captures EXEC result in temp table.
Query_JsonCast()
MSSQL doesn't need explicit JSON cast - it's handled by function signature.
Query_LoadObjectsByIdsSql(string, int)
MSSQL: Load objects by IDs as JSON using get_object_json function.
Query_ProjectionByIdsTemplate(string)
SQL for projection by structure IDs query.
Query_ProjectionByPathsTemplate()
SQL for projection by paths query.
Query_PvtModuleCompatFunction()
Bare SQL function name returning what a deployed module still serves: '<oldest package module versio...
Query_PvtModuleVersionFunction()
Bare SQL function name returning the deployed v2-pvt module
Query_PvtRequiredVersion()
Semver string the shipped v2-pvt bundle for this dialect declares.
Query_SearchFullTemplate()
MSSQL always uses the _base version; the C# side passes 8 params (the include_facets slot stays).
Query_SearchObjectsBaseFunction()
Name of the search function for objects base fields only (lazy loading).
Query_SearchObjectsFunction()
Name of the search function for objects with facets (eager loading).
Query_SearchObjectsProjectionByIdsFunction()
Name of the search function with projection by IDs.
Query_SearchObjectsProjectionByPathsFunction()
Name of the search function with projection by paths.
Query_SearchObjectsSimpleSql()
Simple search for Delete operations - LEGACY. MSSql free must migrate to PVT pipeline.
Query_SearchTemplate()
MSSQL uses EXEC for stored procedures. Procedure returns 'result' column.
Query_SearchTreeObjectsBaseFunction()
Name of the tree search function base fields only (lazy loading).
Query_SearchTreeObjectsFunction()
Name of the tree search function (eager loading).
Query_SearchWithDistinctTemplate()
SQL template for search query with distinct. Params: functionName
Query_SqlPreviewBaseFunction()
SQL preview function name for base (lazy loading) search.
Query_SqlPreviewFunction()
SQL preview function name for regular search.
Query_SqlPreviewTemplate()
SQL for SQL preview function.
Query_TextArrayCast()
MSSQL uses STRING_SPLIT instead of array cast.
Query_TreeCountNormalSql(string)
For Tree procedures, we use temp table to capture EXEC result and extract total_count.
Query_TreeCountWithParentIdsSql(string)
MSSQL: capture EXEC result and extract total_count.
Query_TreeSearchNormalSql(string)
SQL for tree search query (normal search).
Query_TreeSearchWithParentIdsSql(string)
Tree search with parent_ids array (8 params).
Query_TreeSqlPreviewBaseFunction()
SQL preview function name for tree base (lazy loading) search.
Query_TreeSqlPreviewFunction()
SQL preview function name for tree search.
Query_TreeSqlPreviewTemplate(string)
SQL for tree SQL preview.
Query_WindowSql()
SQL for window query.
Query_WrapPvtProjectionRowsAsJson(string, bool)
Wraps the projection inner SQL into a result-set of JSON rows
Query_WrapPvtWithCount(string)
Wraps the inner _id-list SQL with COUNT(*).
Query_WrapPvtWithExists(string)
Wraps the inner _id-list SQL with EXISTS(...).
Query_WrapPvtWithObjectJson(string, int)
Wraps the inner _id-list SQL with the system materializer to
WrapSubquery(string, string)
Subquery wrapper: (subquery) AS alias
MssqlQueryableProvider
redb.MSSql.Providers
CreateEmptyTreeQuery<TProps>(long, long?, bool)
Create empty tree query (for null rootObject case).
CreateMultiRootTreeQuery<TProps>(long, long?, bool, List<IRedbObject>, int?)
Create tree query for multiple root objects.
CreateMultiRootTreeQueryByIds<TProps>(long, long?, bool, IEnumerable<long>, int?)
Create tree query for multiple root object IDs.
CreateQuery<TProps>(long, long?, bool)
Create DB-specific query provider for flat queries.
CreateTreeQuery<TProps>(long, long?, bool, long?, int?)
Create DB-specific query provider for tree queries.
MssqlQueryProvider
redb.MSSql.Query
ExecuteArrayGroupQueryAsync(ArrayGroupQuery, CancellationToken)
GroupByArray on the free SQL Server provider: dbo.pvt_build_array_groupby_sql of the module builds t...
ExecuteGroupedWindowQueryAsync(long, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, FilterExpression?, string?, CancellationToken)
Execute GroupBy with Window Functions with FilterExpression.
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...
ExecuteWindowQueryAsync(long, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, FilterExpression?, string?, int?, int?, CancellationToken)
Execute window query with FilterExpression (Pro version).
ExecuteWindowQueryAsync(long, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, string?, int?, int?, CancellationToken)
Execute query with window functions (SQL function query_with_window).
GetArrayGroupQuerySqlAsync(ArrayGroupQuery, CancellationToken)
SQL of ; see there.
MssqlTreeQueryable<TProps>
redb.MSSql.Query
CreateInstance(TreeQueryContext<TProps>)
Creates a new instance with the specified context.
MssqlTreeQueryProvider
redb.MSSql.Query
CreateQueryProvider()
Creates query provider for delegation.
CreateTreeQueryable<TProps>(TreeQueryContext<TProps>)
Creates tree queryable instance.
ExecuteTreeCountAsync<TProps>(TreeQueryContext<TProps>, CancellationToken)
Execute COUNT for tree query through search_tree_objects_with_facets
ExecuteTreeToListAsync<TProps>(TreeQueryContext<TProps>, CancellationToken)
Execute ToList for tree query through search_tree_objects_with_facets
GetSqlPreviewAsync<TProps>(TreeQueryContext<TProps>, CancellationToken)
Builds the inner SELECT _id ... SQL via dbo.pvt_build_query_sql.
WithIdsInstead<TProps>(TreeQueryContext<TProps>, TreeFilter, IReadOnlyCollection<long>)
The query without treeFilter, its object id confined to ids.
NpgsqlRedbConnection
redb.Postgres.Data
Query<T>(string, params object[])
Synchronous : runs on the calling thread down to ADO.NET.
QueryAsync<T>(string, object[], CancellationToken)
Cancellable form: parameters as an explicit array (params cannot precede ct).
QueryAsync<T>(string, params object[])
Execute SQL query and map results to list of objects.
QueryFirstOrDefault<T>(string, params object[])
Synchronous : runs on the calling thread down to ADO.NET.
QueryFirstOrDefaultAsync<T>(string, object[], CancellationToken)
Cancellable form.
QueryFirstOrDefaultAsync<T>(string, params object[])
Execute SQL query and return first result.
QueryRowsAsJsonAsync(string, object[], CancellationToken)
Execute SQL and serialize the result rows to a JSON array string in C# (column names from the reader...
QueryScalarListAsync<T>(string, object[], CancellationToken)
Cancellable form.
QueryScalarListAsync<T>(string, params object[])
Execute SQL query and return list of scalar values (first column only).
NpgsqlRedbContext
redb.Postgres.Data
QueryRowsAsJsonCoreAsync(string, object[], CancellationToken)
The provider's row-to-JSON read behind , run on : every
PostgreSqlDialect
redb.Postgres.Sql
Query_AggregateArrayGroupedSql()
SQL for array grouped aggregation.
Query_AggregateBatchPreviewSql()
SQL for aggregate batch preview.
Query_AggregateBatchSql()
SQL for aggregate batch function.
Query_AggregateFieldSql()
SQL for aggregate field.
Query_AggregateGroupedSql()
SQL for grouped aggregation.
Query_BigintArrayCast()
Bigint array cast. PostgreSQL: "::bigint[]"
Query_BuildPvtProjectionSqlFunction()
Bare SQL function name returning the projection SELECT string.
Query_BuildPvtProjectionSqlInvocation(long, int?, int, int, bool, string, long[]?, bool)
Builds the full SELECT statement that invokes
Query_BuildPvtSqlFunction()
Bare SQL function name returning the inner _id-list SQL string.
Query_BuildPvtSqlInvocation(long, int?, int, int, bool, string, long[]?, bool)
Builds the full SELECT statement that invokes pvt_build_query_sql.
Query_CheckPermissionSql()
SQL for checking user permission on object.
Query_CountTemplate()
SQL template for COUNT query. Params: functionName
Query_GetDescendantIdsFromAncestorsSql(string, int)
PostgreSQL: the descendants of the given objects down to depthLimit levels below them.
Query_GetIdsWithAncestorsSql(string)
PostgreSQL: Get all IDs with their ancestors using recursive CTE.
Query_GetParentIdsFromDescendantsSql(string, int)
PostgreSQL: WITH RECURSIVE for traversing ancestors.
Query_HasAncestorNormalSql(string)
HasAncestor with normal function (6 params).
Query_HasAncestorTreeSql(string)
HasAncestor with tree function (8 params).
Query_HasDescendantSql(string)
HasDescendant with normal function (6 params).
Query_JsonCast()
JSON cast expression for the database.
Query_LoadObjectsByIdsSql(string, int)
PostgreSQL: Load objects by IDs as JSON using get_object_json function.
Query_ProjectionByIdsTemplate(string)
SQL for projection by structure IDs query.
Query_ProjectionByPathsTemplate()
SQL for projection by paths query.
Query_PvtModuleCompatFunction()
Bare SQL function name returning what a deployed module still serves: '<oldest package module versio...
Query_PvtModuleVersionFunction()
Bare SQL function name returning the deployed v2-pvt module
Query_PvtRequiredVersion()
Semver string the shipped v2-pvt bundle for this dialect declares.
Query_SearchFullTemplate()
SQL template for full search query with distinct and facets. Params: functionName
Query_SearchObjectsBaseFunction()
Name of the search function for objects base fields only (lazy loading).
Query_SearchObjectsFunction()
Name of the search function for objects with facets (eager loading).
Query_SearchObjectsProjectionByIdsFunction()
Name of the search function with projection by IDs.
Query_SearchObjectsProjectionByPathsFunction()
Name of the search function with projection by paths.
Query_SearchObjectsSimpleSql()
Simple search for Delete operations - LEGACY. PG must migrate to PVT pipeline.
Query_SearchTemplate()
SQL template for search query result. Params: functionName
Query_SearchTreeObjectsBaseFunction()
Name of the tree search function base fields only (lazy loading).
Query_SearchTreeObjectsFunction()
Name of the tree search function (eager loading).
Query_SearchWithDistinctTemplate()
SQL template for search query with distinct. Params: functionName
Query_SqlPreviewBaseFunction()
SQL preview function name for base (lazy loading) search.
Query_SqlPreviewFunction()
SQL preview function name for regular search.
Query_SqlPreviewTemplate()
SQL for SQL preview function.
Query_TextArrayCast()
Text array cast. PostgreSQL: "::text[]"
Query_TreeCountNormalSql(string)
SQL for tree count query (normal search).
Query_TreeCountWithParentIdsSql(string)
PostgreSQL: extract total_count from tree function result.
Query_TreeSearchNormalSql(string)
SQL for tree search query (normal search).
Query_TreeSearchWithParentIdsSql(string)
Tree search with parent_ids array (8 params).
Query_TreeSqlPreviewBaseFunction()
SQL preview function name for tree base (lazy loading) search.
Query_TreeSqlPreviewFunction()
SQL preview function name for tree search.
Query_TreeSqlPreviewTemplate(string)
SQL for tree SQL preview.
Query_WindowSql()
SQL for window query.
Query_WrapPvtProjectionRowsAsJson(string, bool)
Wraps the projection inner SQL into a result-set of JSON rows
Query_WrapPvtWithCount(string)
Wraps the inner _id-list SQL with COUNT(*).
Query_WrapPvtWithExists(string)
Wraps the inner _id-list SQL with EXISTS(...).
Query_WrapPvtWithObjectJson(string, int)
Wraps the inner _id-list SQL with the system materializer to
WrapSubquery(string, string)
Subquery wrapper: (subquery) AS alias
PostgresQueryableProvider
redb.Postgres.Providers
CreateEmptyTreeQuery<TProps>(long, long?, bool)
Create empty tree query (for null rootObject case).
CreateMultiRootTreeQuery<TProps>(long, long?, bool, List<IRedbObject>, int?)
Create tree query for multiple root objects.
CreateMultiRootTreeQueryByIds<TProps>(long, long?, bool, IEnumerable<long>, int?)
Create tree query for multiple root object IDs.
CreateQuery<TProps>(long, long?, bool)
Create DB-specific query provider for flat queries.
CreateTreeQuery<TProps>(long, long?, bool, long?, int?)
Create DB-specific query provider for tree queries.
PostgresQueryProvider
redb.Postgres.Query
ExecuteArrayGroupQueryAsync(ArrayGroupQuery, CancellationToken)
GroupByArray on the free PostgreSQL provider: pvt_build_array_groupby_sql of the module builds the
ExecuteGroupedWindowQueryAsync(long, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, FilterExpression?, string?, CancellationToken)
Execute GroupBy with Window Functions with FilterExpression.
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...
ExecuteWindowQueryAsync(long, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, FilterExpression?, string?, int?, int?, CancellationToken)
Execute window query with FilterExpression (Pro version).
ExecuteWindowQueryAsync(long, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, string?, int?, int?, CancellationToken)
Execute query with window functions (SQL function query_with_window).
GetArrayGroupQuerySqlAsync(ArrayGroupQuery, CancellationToken)
SQL of ; see there.
PostgresTreeQueryable<TProps>
redb.Postgres.Query
CreateInstance(TreeQueryContext<TProps>)
Creates a new instance with the specified context.
PostgresTreeQueryProvider
redb.Postgres.Query
CreateQueryProvider()
Creates query provider for delegation.
CreateTreeQueryable<TProps>(TreeQueryContext<TProps>)
Creates tree queryable instance.
ExecuteTreeCountAsync<TProps>(TreeQueryContext<TProps>, CancellationToken)
Execute COUNT for tree query through search_tree_objects_with_facets
ExecuteTreeToListAsync<TProps>(TreeQueryContext<TProps>, CancellationToken)
Execute ToList for tree query through search_tree_objects_with_facets
GetSqlPreviewAsync<TProps>(TreeQueryContext<TProps>, CancellationToken)
SQL preview of a tree query: the statement pvt_build_query_sql compiles for it, with
WithIdsInstead<TProps>(TreeQueryContext<TProps>, TreeFilter, IReadOnlyCollection<long>)
The query without treeFilter, its object id confined to ids.
ProFeatureCategory
redb.Core.Exceptions
DistinctQuery
DistinctRedb/DistinctBy queries.
ProQueryableProvider
redb.MSSql.Pro.Providers
CreateMultiRootTreeQuery<TProps>(long, long?, bool, List<IRedbObject>, int?)
Override: MultiRoot TreeQuery also uses ProTreeQueryProvider.
CreateMultiRootTreeQueryByIds<TProps>(long, long?, bool, IEnumerable<long>, int?)
Override: MultiRoot TreeQuery by IDs also uses ProTreeQueryProvider.
CreateQuery<TProps>(long, long?, bool)
Override: Uses ProQueryProvider instead of MSSqlQueryProvider
CreateTreeQuery<TProps>(long, long?, bool, long?, int?)
Override: Uses ProTreeQueryProvider instead of MSSqlTreeQueryProvider.
ProQueryableProvider
redb.Postgres.Pro.Providers
CreateMultiRootTreeQuery<TProps>(long, long?, bool, List<IRedbObject>, int?)
Override: MultiRoot TreeQuery also uses ProTreeQueryProvider.
CreateMultiRootTreeQueryByIds<TProps>(long, long?, bool, IEnumerable<long>, int?)
Override: MultiRoot TreeQuery by IDs also uses ProTreeQueryProvider.
CreateQuery<TProps>(long, long?, bool)
Override: Uses ProQueryProvider instead of PostgresQueryProvider
CreateTreeQuery<TProps>(long, long?, bool, long?, int?)
Override: Uses ProTreeQueryProvider instead of PostgresTreeQueryProvider.
ProQueryProvider
redb.MSSql.Pro.Query
CheckProOnlyDistinctFeatures<TProps>(QueryContext<TProps>)
Pro version supports all Distinct features
ExecuteAnyAsync<TProps>(QueryContext<TProps>, CancellationToken)
Pro Override: existence without counting. Where the streams form applies, TOP (1) over the
ExecuteArrayGroupQueryAsync(ArrayGroupQuery, CancellationToken)
GroupByArray on the free SQL Server provider: dbo.pvt_build_array_groupby_sql of the module builds t...
ExecuteCountAsync<TProps>(QueryContext<TProps>, CancellationToken)
Pro Override: COUNT via CTE + JOIN (uses BuildQuerySqlAsync).
ExecuteCountAsync<TProps>(QueryContext<TProps>)
Pro Override: COUNT via CTE + JOIN (uses BuildQuerySqlAsync).
ExecuteGroupedWindowQueryAsync(long, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, FilterExpression?, string?, CancellationToken)
Execute GroupBy with Window Functions with FilterExpression.
ExecuteGroupedWindowQueryAsync(long, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, FilterExpression?)
Execute GroupBy with Window Functions with FilterExpression (Pro version).
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...
ExecuteGroupedWindowQueryAsync(long, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?)
Execute GroupBy with Window Functions.
ExecuteToListAsync<TProps>(QueryContext<TProps>, Type, CancellationToken)
PVT-based search (uses BuildQuerySqlAsync)
ExecuteToListAsync<TProps>(QueryContext<TProps>, Type)
PVT-based search (uses BuildQuerySqlAsync)
ExecuteWindowQueryAsync(long, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, FilterExpression?, string?, int?, int?, CancellationToken)
Pro: Window Functions with FilterExpression (preferred).
ExecuteWindowQueryAsync(long, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, FilterExpression?, string?, int?, int?)
⚡ Pro: Window Functions with FilterExpression (preferred).
ExecuteWindowQueryAsync(long, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, string?, int?, int?, CancellationToken)
Pro: Window Functions with filterJson (legacy).
ExecuteWindowQueryAsync(long, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, string?, int?, int?)
⚡ Pro: Window Functions with filterJson (legacy).
GetAggregateSqlPreviewAsync<TProps, TResult>(QueryContext<TProps>, Expression<Func<RedbObject<TProps>, TResult>>, CancellationToken)
Pro Override: SQL Preview for aggregation
GetAggregateSqlPreviewAsync<TProps, TResult>(QueryContext<TProps>, Expression<Func<RedbObject<TProps>, TResult>>)
Pro Override: SQL Preview for aggregation
GetArrayGroupQuerySqlAsync(ArrayGroupQuery, CancellationToken)
SQL of ; see there.
GetSqlPreviewAsync<TProps>(QueryContext<TProps>, CancellationToken)
SQL Preview (uses BuildQuerySqlAsync).
GetSqlPreviewAsync<TProps>(QueryContext<TProps>)
SQL Preview (uses BuildQuerySqlAsync).
ProQueryProvider
redb.Postgres.Pro.Query
CheckProOnlyDistinctFeatures<TProps>(QueryContext<TProps>)
Pro version supports all Distinct features.
ExecuteAnyAsync<TProps>(QueryContext<TProps>, CancellationToken)
Is there at least one object the query returns. The default is the count compared with
ExecuteArrayGroupQueryAsync(ArrayGroupQuery, CancellationToken)
GroupByArray on the free PostgreSQL provider: pvt_build_array_groupby_sql of the module builds the
ExecuteCountAsync<TProps>(QueryContext<TProps>, CancellationToken)
Pro Override: COUNT via CTE + JOIN (uses BuildQuerySqlAsync).
ExecuteCountAsync<TProps>(QueryContext<TProps>)
Pro Override: COUNT via CTE + JOIN (uses BuildQuerySqlAsync).
ExecuteGroupedWindowQueryAsync(long, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, FilterExpression?, string?, CancellationToken)
Execute GroupBy + Window query with FilterExpression (preferred).
ExecuteGroupedWindowQueryAsync(long, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, FilterExpression?)
Execute GroupBy + Window query with FilterExpression (preferred).
ExecuteGroupedWindowQueryAsync(long, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, string?, CancellationToken)
Execute GroupBy + Window query with filterJson (legacy).
ExecuteGroupedWindowQueryAsync(long, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?)
Execute GroupBy + Window query with filterJson (legacy).
ExecuteToListAsync<TProps>(QueryContext<TProps>, Type, CancellationToken)
PVT-based search (uses BuildQuerySqlAsync)
ExecuteToListAsync<TProps>(QueryContext<TProps>, Type)
PVT-based search (uses BuildQuerySqlAsync)
ExecuteWindowQueryAsync(long, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, FilterExpression?, string?, int?, int?, CancellationToken)
Pro: Window Functions with FilterExpression (preferred).
ExecuteWindowQueryAsync(long, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, FilterExpression?, string?, int?, int?)
⚡ Pro: Window Functions with FilterExpression (preferred).
ExecuteWindowQueryAsync(long, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, string?, int?, int?, CancellationToken)
Pro: Window Functions with filterJson (legacy).
ExecuteWindowQueryAsync(long, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, string?, int?, int?)
⚡ Pro: Window Functions with filterJson (legacy).
GetAggregateSqlPreviewAsync<TProps, TResult>(QueryContext<TProps>, Expression<Func<RedbObject<TProps>, TResult>>, CancellationToken)
Pro Override: SQL Preview for aggregation
GetAggregateSqlPreviewAsync<TProps, TResult>(QueryContext<TProps>, Expression<Func<RedbObject<TProps>, TResult>>)
Pro Override: SQL Preview for aggregation
GetArrayGroupQuerySqlAsync(ArrayGroupQuery, CancellationToken)
SQL of ; see there.
GetSqlPreviewAsync<TProps>(QueryContext<TProps>, CancellationToken)
SQL Preview (uses BuildQuerySqlAsync).
GetSqlPreviewAsync<TProps>(QueryContext<TProps>)
SQL Preview (uses BuildQuerySqlAsync).
ProSqlBuilder
redb.MSSql.Pro.Query
BuildLimitOffset<TProps>(QueryContext<TProps>, SqlParameterCollector?)
Generates OFFSET/FETCH clause (T-SQL syntax).
BuildOrderByClause<TProps>(QueryContext<TProps>, IReadOnlyDictionary<string, FieldInfo>, string?, SqlParameterCollector?, IReadOnlySet<string>?, string, string)
Generates ORDER BY clause.
BuildOrderByClause<TProps>(QueryContext<TProps>, IReadOnlyDictionary<string, FieldInfo>, string?, SqlParameterCollector?, IReadOnlySet<string>?, string)
Generates ORDER BY clause.
BuildPropsValueSubquery(FieldInfo, string, int?)
Generates subquery for getting Props value.
BuildPvtSubquery(long, IReadOnlyCollection<FieldInfo>, IReadOnlyCollection<string>, SqlParameterCollector, string?)
Generates PVT subquery for GROUP BY (T-SQL syntax).
BuildSelectClause<TProps>(QueryContext<TProps>, IReadOnlyDictionary<string, FieldInfo>, SqlParameterCollector, IReadOnlySet<string>?, string)
Generates SELECT clause with DISTINCT support.
CompileBaseFieldsForObjectsSubquery(FilterExpression, SqlParameterCollector?, string)
Compiles ONLY base fields with a custom table alias prefix (or none).
ProSqlBuilder
redb.Postgres.Pro.Query
BuildLimitOffset<TProps>(QueryContext<TProps>, SqlParameterCollector?)
Generates LIMIT/OFFSET clause
BuildOrderByClause<TProps>(QueryContext<TProps>, IReadOnlyDictionary<string, FieldInfo>, string?, SqlParameterCollector?, IReadOnlySet<string>?, string, string)
Generates ORDER BY clause with DISTINCT ON support.
BuildOrderByClause<TProps>(QueryContext<TProps>, IReadOnlyDictionary<string, FieldInfo>, string?, SqlParameterCollector?, IReadOnlySet<string>?, string)
Generates ORDER BY clause with DISTINCT ON support.
BuildPropsValueSubquery(FieldInfo, string, int?)
Generates subquery for getting Props value
BuildPvtSubquery(long, IReadOnlyCollection<FieldInfo>, IReadOnlyCollection<string>, SqlParameterCollector, string?)
Generates PVT subquery for GROUP BY
BuildSelectClause<TProps>(QueryContext<TProps>, IReadOnlyDictionary<string, FieldInfo>, SqlParameterCollector, IReadOnlySet<string>?, string)
Generates SELECT clause with DISTINCT ON support.
CompileBaseFieldsForObjectsSubquery(FilterExpression, SqlParameterCollector?, string)
Compiles ONLY base fields with a custom table alias prefix (or none).
ProTreeQueryProvider
redb.MSSql.Pro.Query
ExecuteArrayGroupQueryAsync(ArrayGroupQuery, CancellationToken)
Array grouping without a tree: the flat provider answers it.
ExecuteTreeAggregateAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<AggregateRequest>, CancellationToken)
Execute tree aggregation with CTE.
ExecuteTreeAggregateAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<AggregateRequest>)
Execute tree aggregation with CTE.
ExecuteTreeAnyAsync<TProps>(TreeQueryContext<TProps>, CancellationToken)
Pro Override: Tree Any as the list statement cut to one node (FETCH NEXT 1, no ordering of the query...
ExecuteTreeArrayGroupQueryAsync<TProps>(TreeQueryContext<TProps>, ArrayGroupQuery, CancellationToken)
Array grouping over the objects of a subtree. Base implementation: the ids of the subtree (roots, de...
ExecuteTreeCountAsync<TProps>(TreeQueryContext<TProps>, CancellationToken)
Pro Override: Tree Count via CTE + pvt.
ExecuteTreeCountAsync<TProps>(TreeQueryContext<TProps>)
⚡ Pro Override: Tree Count via CTE + pvt.
ExecuteTreeGroupByAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, CancellationToken)
Execute GROUP BY on tree with CTE.
ExecuteTreeGroupByAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>)
Execute GROUP BY on tree with CTE.
ExecuteTreeGroupedAggregateAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, string?, CancellationToken)
ITreeQueryProvider implementation: Execute GROUP BY with tree context.
ExecuteTreeGroupedAggregateAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>)
ITreeQueryProvider implementation: Execute GROUP BY with tree context.
ExecuteTreeGroupedWindowQueryAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, CancellationToken)
Execute GroupBy + Window with tree context.
ExecuteTreeGroupedWindowQueryAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>)
Execute GroupBy + Window with tree context.
ExecuteTreeToListAsync<TProps>(TreeQueryContext<TProps>, CancellationToken)
Pro Override: Tree ToList via CTE + pvt.
ExecuteTreeToListAsync<TProps>(TreeQueryContext<TProps>)
⚡ Pro Override: Tree ToList via CTE + pvt.
ExecuteTreeWindowAsync<TProps>(TreeQueryContext<TProps>, string, string, string, string, string?, CancellationToken)
Execute Window Functions on tree with CTE (legacy JSON version).
ExecuteTreeWindowAsync<TProps>(TreeQueryContext<TProps>, string, string, string, string, string?)
Execute Window Functions on tree with CTE (legacy JSON version).
ExecuteTreeWindowQueryAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, CancellationToken)
Execute Window Functions on tree with CTE (interface implementation).
ExecuteTreeWindowQueryAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?)
Execute Window Functions on tree with CTE (interface implementation).
ExecuteWindowQueryAsync(long, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, string?, int?, int?, CancellationToken)
Execute query with window functions (SQL function query_with_window).
ExecuteWindowQueryAsync(long, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, string?, int?, int?)
Execute query with window functions (SQL function query_with_window).
GetSqlPreviewAsync<TProps>(TreeQueryContext<TProps>, CancellationToken)
Pro: Tree SQL Preview (DRY - uses BuildTreeQuerySqlAsync)
GetSqlPreviewAsync<TProps>(TreeQueryContext<TProps>)
Pro: Tree SQL Preview (DRY - uses BuildTreeQuerySqlAsync)
GetTreeAggregateSqlPreviewAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<AggregateRequest>, CancellationToken)
SQL Preview for Tree Aggregate (DRY - same SQL as Execute)
GetTreeAggregateSqlPreviewAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<AggregateRequest>)
SQL Preview for Tree Aggregate (DRY - same SQL as Execute)
GetTreeArrayGroupQuerySqlAsync<TProps>(TreeQueryContext<TProps>, ArrayGroupQuery, CancellationToken)
SQL of : the flat array grouping over the ids of the subtree.
GetTreeGroupBySqlPreviewAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, string?, CancellationToken)
SQL Preview for Tree GroupBy (DRY - same SQL as Execute)
GetTreeGroupBySqlPreviewAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>)
SQL Preview for Tree GroupBy (DRY - same SQL as Execute)
GetTreeGroupedWindowSqlPreviewAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, CancellationToken)
Get SQL preview for tree GroupBy + Window.
GetTreeGroupedWindowSqlPreviewAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>)
Get SQL preview for tree GroupBy + Window.
GetTreeWindowSqlPreviewAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, CancellationToken)
SQL Preview for Tree Window (typed interface version).
GetTreeWindowSqlPreviewAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?)
SQL Preview for Tree Window (typed interface version).
GetTreeWindowSqlPreviewAsync<TProps>(TreeQueryContext<TProps>, string, string, string, string, string?, CancellationToken)
SQL Preview for Tree Window (DRY - same SQL as Execute)
GetTreeWindowSqlPreviewAsync<TProps>(TreeQueryContext<TProps>, string, string, string, string, string?)
SQL Preview for Tree Window (DRY - same SQL as Execute)
ProTreeQueryProvider
redb.Postgres.Pro.Query
ExecuteArrayGroupQueryAsync(ArrayGroupQuery, CancellationToken)
Array grouping without a tree: the flat provider answers it.
ExecuteTreeAggregateAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<AggregateRequest>, CancellationToken)
Execute tree aggregation with CTE.
ExecuteTreeAggregateAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<AggregateRequest>)
Execute tree aggregation with CTE.
ExecuteTreeAnyAsync<TProps>(TreeQueryContext<TProps>, CancellationToken)
Pro Override: Tree Any as the list statement cut to one node (LIMIT 1, no ordering), the first colum...
ExecuteTreeArrayGroupQueryAsync<TProps>(TreeQueryContext<TProps>, ArrayGroupQuery, CancellationToken)
Array grouping over the objects of a subtree. Base implementation: the ids of the subtree (roots, de...
ExecuteTreeCountAsync<TProps>(TreeQueryContext<TProps>, CancellationToken)
Pro Override: Tree Count via CTE + PVT.
ExecuteTreeCountAsync<TProps>(TreeQueryContext<TProps>)
⚡ Pro Override: Tree Count via CTE + PVT.
ExecuteTreeGroupByAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, CancellationToken)
Execute GROUP BY on tree with CTE.
ExecuteTreeGroupByAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>)
Execute GROUP BY on tree with CTE.
ExecuteTreeGroupedAggregateAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, string?, CancellationToken)
ITreeQueryProvider implementation: Execute GROUP BY with tree context.
ExecuteTreeGroupedAggregateAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>)
ITreeQueryProvider implementation: Execute GROUP BY with tree context.
ExecuteTreeGroupedWindowQueryAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, CancellationToken)
Execute Tree GroupBy + Window query.
ExecuteTreeGroupedWindowQueryAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>)
Execute Tree GroupBy + Window query.
ExecuteTreeToListAsync<TProps>(TreeQueryContext<TProps>, CancellationToken)
Pro Override: Tree ToList via CTE + PVT.
ExecuteTreeToListAsync<TProps>(TreeQueryContext<TProps>)
⚡ Pro Override: Tree ToList via CTE + PVT.
ExecuteTreeWindowAsync<TProps>(TreeQueryContext<TProps>, string, string, string, string, string?, CancellationToken)
Execute Window Functions on tree with CTE (legacy JSON version).
ExecuteTreeWindowAsync<TProps>(TreeQueryContext<TProps>, string, string, string, string, string?)
Execute Window Functions on tree with CTE (legacy JSON version).
ExecuteTreeWindowQueryAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, CancellationToken)
Execute Window Functions on tree with CTE (interface implementation).
ExecuteTreeWindowQueryAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?)
Execute Window Functions on tree with CTE (interface implementation).
ExecuteWindowQueryAsync(long, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, string?, int?, int?, CancellationToken)
Execute query with window functions (SQL function query_with_window).
ExecuteWindowQueryAsync(long, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, string?, int?, int?)
Execute query with window functions (SQL function query_with_window).
GetSqlPreviewAsync<TProps>(TreeQueryContext<TProps>, CancellationToken)
Pro: Tree SQL Preview (DRY - uses BuildTreeQuerySqlAsync)
GetSqlPreviewAsync<TProps>(TreeQueryContext<TProps>)
Pro: Tree SQL Preview (DRY - uses BuildTreeQuerySqlAsync)
GetTreeAggregateSqlPreviewAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<AggregateRequest>, CancellationToken)
SQL Preview for Tree Aggregate (DRY - same SQL as Execute)
GetTreeAggregateSqlPreviewAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<AggregateRequest>)
SQL Preview for Tree Aggregate (DRY - same SQL as Execute)
GetTreeArrayGroupQuerySqlAsync<TProps>(TreeQueryContext<TProps>, ArrayGroupQuery, CancellationToken)
SQL of : the flat array grouping over the ids of the subtree.
GetTreeGroupBySqlPreviewAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, string?, CancellationToken)
SQL Preview for Tree GroupBy (DRY - same SQL as Execute)
GetTreeGroupBySqlPreviewAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>)
SQL Preview for Tree GroupBy (DRY - same SQL as Execute)
GetTreeGroupedWindowSqlPreviewAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, CancellationToken)
SQL preview for Tree GroupBy + Window.
GetTreeGroupedWindowSqlPreviewAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>)
SQL preview for Tree GroupBy + Window.
GetTreeWindowSqlPreviewAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, CancellationToken)
SQL Preview for Tree Window (typed interface version).
GetTreeWindowSqlPreviewAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?)
SQL Preview for Tree Window (typed interface version).
GetTreeWindowSqlPreviewAsync<TProps>(TreeQueryContext<TProps>, string, string, string, string, string?, CancellationToken)
SQL Preview for Tree Window (DRY - same SQL as Execute)
GetTreeWindowSqlPreviewAsync<TProps>(TreeQueryContext<TProps>, string, string, string, string, string?)
SQL Preview for Tree Window (DRY - same SQL as Execute)
PvtPrefilterReason
redb.Core.Pro.Query
NotPlainQuery
DISTINCT in any form: the streams form does not build the DISTINCT ON select list.
QueryableProviderBase
redb.Core.Providers.Base
CreateEmptyTreeQuery<TProps>(long, long?, bool)
Create empty tree query (for null rootObject case).
CreateMultiRootTreeQuery<TProps>(long, long?, bool, List<IRedbObject>, int?)
Create tree query for multiple root objects.
CreateMultiRootTreeQueryByIds<TProps>(long, long?, bool, IEnumerable<long>, int?)
Create tree query for multiple root object IDs.
CreateQuery<TProps>(long, long?, bool)
Create DB-specific query provider for flat queries.
CreateTreeQuery<TProps>(long, long?, bool, long?, int?)
Create DB-specific query provider for tree queries.
Query<TProps>()
Create type-safe query by type (synchronous).
Query<TProps>(IRedbUser)
Create type-safe query by type with specified user (synchronous).
TreeQuery<TProps>()
Create type-safe tree query by type (synchronous).
TreeQuery<TProps>(IEnumerable<IRedbObject>, int?)
Create tree query limited to subtrees of object list (synchronous).
TreeQuery<TProps>(IEnumerable<IRedbObject>, IRedbUser, int?)
Create tree query limited to subtrees of object list with specified user (synchronous).
TreeQuery<TProps>(IEnumerable<long>, int?)
Create tree query limited to subtrees by ID list (synchronous).
TreeQuery<TProps>(IEnumerable<long>, IRedbUser, int?)
Create tree query limited to subtrees by ID list with specified user (synchronous).
TreeQuery<TProps>(IRedbObject?, int?)
Create tree query limited to subtree (synchronous).
TreeQuery<TProps>(IRedbObject?, IRedbUser, int?)
Create tree query limited to subtree with specified user (synchronous).
TreeQuery<TProps>(IRedbUser)
Create type-safe tree query by type with specified user (synchronous).
TreeQuery<TProps>(long, int?)
Create tree query limited to subtree (synchronous, by ID).
TreeQuery<TProps>(long, IRedbUser, int?)
Create tree query limited to subtree with specified user (synchronous, by ID).
QueryContext<TProps>
redb.Core.Query
QueryParameters
redb.Core.Query.FacetFilters
QueryParameters(int?, int?)
Query parameters.
QueryProviderBase
redb.Core.Query.Base
BuildPvtInnerSqlAsync<TProps>(QueryContext<TProps>, bool, CancellationToken)
Phase 1: ask the database to build the inner _id-list SQL string.
CanUsePvtPipeline<TProps>(QueryContext<TProps>)
Returns true when the active dialect exposes the v2-pvt module.
CanUsePvtProjection<TProps>(QueryContext<TProps>)
Returns true when the active dialect exposes native PVT projection
CheckProOnlyDistinctFeatures<TProps>(QueryContext<TProps>)
Hook for Distinct-related feature checks. No-op in OSS — DistinctRedb /
CreateQuery<TProps>(long, long?, bool)
Create new query for specified scheme.
ExecuteAnyAsync<TProps>(QueryContext<TProps>, CancellationToken)
Is there at least one object the query returns. The default is the count compared with
ExecuteArrayGroupQueryAsync(ArrayGroupQuery, CancellationToken)
Grouping over the elements of an array. Every provider that supports GroupByArray overrides it; a pr...
ExecuteCountAsync<TProps>(QueryContext<TProps>, CancellationToken)
Executes COUNT query. Override in Pro for PVT-based count with computed expressions.
ExecuteCountAsync<TProps>(QueryContext<TProps>)
Executes COUNT query. Override in Pro for PVT-based count with computed expressions.
ExecuteCountAsyncPvt<TProps>(QueryContext<TProps>, CancellationToken)
v2-pvt Count path: COUNT(*) wrapper over the inner _id-list SQL.
ExecuteGroupedWindowQueryAsync(long, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, FilterExpression?, string?, CancellationToken)
Execute GroupBy with Window Functions with FilterExpression.
ExecuteGroupedWindowQueryAsync(long, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, FilterExpression?)
Execute GroupBy with Window Functions with FilterExpression (Pro version).
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...
ExecuteGroupedWindowQueryAsync(long, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?)
Execute GroupBy with Window Functions.
ExecuteToListAsyncPvt<TProps>(QueryContext<TProps>, Type, CancellationToken)
v2-pvt ToList path: wraps the inner SQL with get_object_json, executes,
ExecuteToListAsyncPvtProjection<TProps>(QueryContext<TProps>, CancellationToken)
v2-pvt native projection path. Builds a projection JSON from
ExecuteWindowQueryAsync(long, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, FilterExpression?, string?, int?, int?, CancellationToken)
Execute window query with FilterExpression (Pro version).
ExecuteWindowQueryAsync(long, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, FilterExpression?, string?, int?, int?)
Execute window query with FilterExpression (Pro version).
ExecuteWindowQueryAsync(long, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, string?, int?, int?, CancellationToken)
Execute query with window functions (SQL function query_with_window).
ExecuteWindowQueryAsync(long, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, string?, int?, int?)
Execute query with window functions (SQL function query_with_window).
GetAggregateSqlPreviewAsync<TProps, TResult>(QueryContext<TProps>, Expression<Func<RedbObject<TProps>, TResult>>, CancellationToken)
Returns SQL query for aggregation (for debugging)
GetAggregateSqlPreviewAsync<TProps, TResult>(QueryContext<TProps>, Expression<Func<RedbObject<TProps>, TResult>>)
🔍 Returns SQL query for aggregation (for debugging)
GetArrayGroupQuerySqlAsync(ArrayGroupQuery, CancellationToken)
SQL of ; see there.
GetFilterJsonAsync<TProps>(QueryContext<TProps>, CancellationToken)
Returns the JSON filter that will be sent to SQL function (for diagnostics)
GetFilterJsonAsync<TProps>(QueryContext<TProps>)
Returns the JSON filter that will be sent to SQL function (for diagnostics)
GetSqlPreviewAsync<TProps>(QueryContext<TProps>, CancellationToken)
Returns the SQL query that will be executed (for debugging)
GetSqlPreviewAsync<TProps>(QueryContext<TProps>)
Returns the SQL query that will be executed (for debugging)
GetSqlPreviewAsyncPvt<TProps>(QueryContext<TProps>, CancellationToken)
v2-pvt SQL preview path: returns the inner _id-list SQL as-is.
ShouldUseLazyLoading<TProps>(QueryContext<TProps>)
Determines if lazy loading should be used for this query
RedbArrayGroupedQueryable<TKey, TItem, TProps>
redb.Core.Query.Grouping
RedbArrayGroupedQueryable(IRedbQueryProvider, long, string?, FilterExpression?, Expression<Func<TProps, IEnumerable<TItem>>>, Expression<Func<TItem, TKey>>)
Flat grouping; filterJson is not used, the condition comes from filter.
RedbContextBase
redb.Core.Data
QueryAsync<T>(string, object[], CancellationToken)
Cancellable form: parameters as an explicit array (params cannot precede ct).
QueryAsync<T>(string, params object[])
Execute SQL query and return list of mapped objects.
QueryFirstOrDefaultAsync<T>(string, object[], CancellationToken)
Cancellable form.
QueryFirstOrDefaultAsync<T>(string, params object[])
Execute SQL query and return first result or null.
QueryRowsAsJsonAsync(string, object[], CancellationToken)
The rows of sql as a JSON array of objects keyed by column name, NULL values included;
QueryRowsAsJsonCoreAsync(string, object[], CancellationToken)
The provider's row-to-JSON read behind , run on : every
QueryScalarListAsync<T>(string, object[], CancellationToken)
Cancellable form.
QueryScalarListAsync<T>(string, params object[])
Execute SQL query and return list of scalar values (first column only).
RedbGroupedQueryable<TKey, TProps>
redb.Core.Query.Grouping
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).
RedbProjectedQueryable<TProps, TResult>
redb.Core.Query
RedbProjectedQueryableTaskExtensions
redb.Core.Query
RedbQueryable<TProps>
redb.Core.Query
RedbQueryableExtensions
redb.Core.Query
ToAggregateSqlStringAsync<TProps, TResult>(IRedbQueryable<TProps>, Expression<Func<RedbObject<TProps>, TResult>>)
Returns the SQL query for aggregation (for debugging).
ToSqlStringAsync<TProps>(IRedbQueryable<TProps>)
Returns the SQL query that will be executed (for debugging).
RedbService
redb.MSSql
RedbService
redb.Postgres
RedbServiceBase
redb.Core
CreateQueryableProvider(IRedbContext, IRedbObjectSerializer, ISchemeSyncProvider, IRedbSecurityContext, ILazyPropsLoader, RedbServiceConfiguration, string, ILogger?)
Create queryable provider.
Query<TProps>()
Create type-safe query by type (synchronous).
Query<TProps>(IRedbUser)
Create type-safe query by type with specified user (synchronous).
TreeQuery<TProps>()
Create type-safe tree query by type (synchronous).
TreeQuery<TProps>(IEnumerable<IRedbObject>, int?)
Create tree query limited to subtrees of object list (synchronous).
TreeQuery<TProps>(IEnumerable<IRedbObject>, IRedbUser, int?)
Create tree query limited to subtrees of object list with specified user (synchronous).
TreeQuery<TProps>(IEnumerable<long>, int?)
Create tree query limited to subtrees by ID list (synchronous).
TreeQuery<TProps>(IEnumerable<long>, IRedbUser, int?)
Create tree query limited to subtrees by ID list with specified user (synchronous).
TreeQuery<TProps>(IRedbObject?, int?)
Create tree query limited to subtree (synchronous).
TreeQuery<TProps>(IRedbObject?, IRedbUser, int?)
Create tree query limited to subtree with specified user (synchronous).
TreeQuery<TProps>(IRedbUser)
Create type-safe tree query by type with specified user (synchronous).
TreeQuery<TProps>(long, int?)
Create tree query limited to subtree (synchronous, by ID).
TreeQuery<TProps>(long, IRedbUser, int?)
Create tree query limited to subtree with specified user (synchronous, by ID).
RedbServiceConfiguration
redb.Core.Models.Configuration
DefaultCheckPermissionsOnQuery
Check permissions by default when executing queries.
RedbWindowedQueryable<TProps>
redb.Core.Query.Window
RedbWindowedQueryable(IRedbQueryProvider, long, FilterExpression?, WindowSpec<TProps>, int?, int?)
Constructor with FilterExpression (Pro version).
RedbWindowedQueryable(IRedbQueryProvider, long, string?, WindowSpec<TProps>, int?, int?)
Constructor with filterJson (legacy compatibility).
SqlRedbConnection
redb.MSSql.Data
Query<T>(string, params object[])
Synchronous : runs on the calling thread down to ADO.NET.
QueryAsync<T>(string, object[], CancellationToken)
Cancellable form: parameters as an explicit array (params cannot precede ct).
QueryAsync<T>(string, params object[])
Execute SQL query and return list of mapped objects.
QueryFirstOrDefault<T>(string, params object[])
Synchronous : runs on the calling thread down to ADO.NET.
QueryFirstOrDefaultAsync<T>(string, object[], CancellationToken)
Cancellable form.
QueryFirstOrDefaultAsync<T>(string, params object[])
Execute SQL query and return first result.
QueryRowsAsJsonAsync(string, object[], CancellationToken)
Execute SQL and serialize the result rows to a JSON array string in C# (column names from the reader...
QueryScalarListAsync<T>(string, object[], CancellationToken)
Cancellable form.
QueryScalarListAsync<T>(string, params object[])
Execute SQL query and return list of scalar values (first column only).
SqlRedbContext
redb.MSSql.Data
QueryRowsAsJsonCoreAsync(string, object[], CancellationToken)
The provider's row-to-JSON read behind , run on : every
TreeGroupedQueryable<TKey, TProps>
redb.Core.Query.Grouping
TreeGroupedWindowedQueryable<TKey, TProps>
redb.Core.Query.Grouping
TreeProjectedQueryable<TProps, TResult>
redb.Core.Query
TreeQueryableBase<TProps>
redb.Core.Query.Base
CreateInstance(TreeQueryContext<TProps>)
Creates a new instance with the specified context. Override in derived classes.
TreeQueryContext<TProps>
redb.Core.Query.Base
TreeQueryProviderBase
redb.Core.Query.Base
BuildPvtDistinctOnJson<TProps>(QueryContext<TProps>)
Check for Pro-only Distinct features (DistinctBy, DistinctByRedb, DistinctRedb).
CreateQuery<TProps>(long, long?, bool)
Create new query for specified scheme.
CreateQueryProvider()
Creates query provider for delegation. Override in derived classes.
CreateTreeQuery<TProps>(long, long?, bool, long?, int?)
Create tree query with hierarchical constraint support.
CreateTreeQueryable<TProps>(TreeQueryContext<TProps>)
Creates tree queryable instance. Override in derived classes.
ExecuteArrayGroupQueryAsync(ArrayGroupQuery, CancellationToken)
Array grouping without a tree: the flat provider answers it.
ExecuteGroupedWindowQueryAsync(long, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, FilterExpression?, string?, CancellationToken)
Execute GroupBy with Window Functions with FilterExpression (Pro version).
ExecuteGroupedWindowQueryAsync(long, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, FilterExpression?)
Execute GroupBy with Window Functions with FilterExpression (Pro version).
ExecuteGroupedWindowQueryAsync(long, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, string?, CancellationToken)
Execute GroupBy with Window Functions (ranking, running totals on aggregated data).
ExecuteGroupedWindowQueryAsync(long, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?)
Execute GroupBy with Window Functions (ranking, running totals on aggregated data).
ExecuteOptimizedWhereHasAncestor<TProps>(TreeQueryContext<TProps>, TreeFilter, CancellationToken)
Optimized execution of WhereHasAncestor through logic inversion:
ExecuteOptimizedWhereHasAncestor<TProps>(TreeQueryContext<TProps>, TreeFilter)
Optimized execution of WhereHasAncestor through logic inversion:
ExecuteOptimizedWhereHasDescendant<TProps>(TreeQueryContext<TProps>, TreeFilter, CancellationToken)
Optimized execution of WhereHasDescendant through logic inversion:
ExecuteOptimizedWhereHasDescendant<TProps>(TreeQueryContext<TProps>, TreeFilter)
Optimized execution of WhereHasDescendant through logic inversion:
ExecuteTreeAnyAsync<TProps>(TreeQueryContext<TProps>, CancellationToken)
Is there at least one node the query returns (no Take or Skip: the queryable answers a page by its c...
ExecuteTreeArrayGroupQueryAsync<TProps>(TreeQueryContext<TProps>, ArrayGroupQuery, CancellationToken)
Array grouping over the objects of a subtree. Base implementation: the ids of the subtree (roots, de...
ExecuteTreeCountAsync<TProps>(TreeQueryContext<TProps>, CancellationToken)
Execute COUNT for tree query through search_tree_objects_with_facets
ExecuteTreeCountAsync<TProps>(TreeQueryContext<TProps>)
Execute COUNT for tree query through search_tree_objects_with_facets
ExecuteTreeGroupedAggregateAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, string?, CancellationToken)
Execute GROUP BY with tree context (CTE for tree traversal).
ExecuteTreeGroupedAggregateAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>)
Execute GROUP BY with tree context (CTE for tree traversal).
ExecuteTreeGroupedWindowQueryAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, CancellationToken)
Execute GroupBy + Window with tree context.
ExecuteTreeGroupedWindowQueryAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>)
Execute GroupBy + Window with tree context.
ExecuteTreeToListAsync<TProps>(TreeQueryContext<TProps>, CancellationToken)
Execute ToList for tree query through search_tree_objects_with_facets
ExecuteTreeToListAsync<TProps>(TreeQueryContext<TProps>)
Execute ToList for tree query through search_tree_objects_with_facets
ExecuteTreeWindowQueryAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, CancellationToken)
Execute Window Functions with tree context.
ExecuteTreeWindowQueryAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?)
Execute Window Functions with tree context.
ExecuteWindowQueryAsync(long, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, FilterExpression?, string?, int?, int?, CancellationToken)
Execute query with window functions with FilterExpression (Pro version).
ExecuteWindowQueryAsync(long, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, FilterExpression?, string?, int?, int?)
Execute query with window functions with FilterExpression (Pro version).
ExecuteWindowQueryAsync(long, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, string?, int?, int?, CancellationToken)
Execute query with window functions (SQL function query_with_window).
ExecuteWindowQueryAsync(long, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, string?, int?, int?)
Execute query with window functions (SQL function query_with_window).
FirstNodeProbe<TProps>(TreeQueryContext<TProps>)
The query cut to its first node, for : Take 1, and neither the
GetFilterJsonAsync<TProps>(QueryContext<TProps>, CancellationToken)
Returns the JSON filter that will be sent to SQL function (for diagnostics)
GetFilterJsonAsync<TProps>(QueryContext<TProps>)
Returns the JSON filter that will be sent to SQL function (for diagnostics)
GetOptimizableHasAncestorFilter<TProps>(TreeQueryContext<TProps>)
Determines if WhereHasAncestor can be optimized through logic inversion
GetOptimizableHasDescendantFilter<TProps>(TreeQueryContext<TProps>)
Determines if WhereHasDescendant can be optimized through logic inversion
GetSqlPreviewAsync<TProps>(QueryContext<TProps>, CancellationToken)
Get SQL preview for standard QueryContext (for IRedbQueryProvider compatibility)
GetSqlPreviewAsync<TProps>(QueryContext<TProps>)
Get SQL preview for standard QueryContext (for IRedbQueryProvider compatibility)
GetSqlPreviewAsync<TProps>(TreeQueryContext<TProps>, CancellationToken)
Returns SQL query for tree search that will be executed (for debugging)
GetSqlPreviewAsync<TProps>(TreeQueryContext<TProps>)
Returns SQL query for tree search that will be executed (for debugging)
GetTreeArrayGroupQuerySqlAsync<TProps>(TreeQueryContext<TProps>, ArrayGroupQuery, CancellationToken)
SQL of : the flat array grouping over the ids of the subtree.
GetTreeGroupBySqlPreviewAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, string?, CancellationToken)
Get SQL preview for tree GROUP BY query.
GetTreeGroupBySqlPreviewAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>)
Get SQL preview for tree GROUP BY query.
GetTreeGroupedWindowSqlPreviewAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, CancellationToken)
Get SQL preview for tree GroupBy + Window.
GetTreeGroupedWindowSqlPreviewAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>)
Get SQL preview for tree GroupBy + Window.
GetTreeWindowSqlPreviewAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, CancellationToken)
Get SQL preview for tree window query.
GetTreeWindowSqlPreviewAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?)
Get SQL preview for tree window query.
ShouldUseLazyLoading<TProps>(QueryContext<TProps>)
Determines if lazy loading should be used for this query.
ShouldUseLazyLoading<TProps>(TreeQueryContext<TProps>)
Determines if lazy loading should be used for tree query.
TreeQuerySqlResult
redb.MSSql.Pro.Query
TreeQuerySqlResult(string, SqlParameterCollector, string?, bool)
Result of SQL generation for Tree Query
TreeQuerySqlResult(string, SqlParameterCollector, string?)
Result of SQL generation for Tree Query
TreeQuerySqlResult
redb.Postgres.Pro.Query
TreeQuerySqlResult(string, SqlParameterCollector, string?)
Result of SQL generation for Tree Query
TreeWindowedQueryable<TProps>
redb.Core.Query.Window
TreeWindowedQueryable(ITreeQueryProvider, TreeQueryContext<TProps>, string?, WindowSpec<TProps>)
Creates tree-aware windowed queryable.