Class PostgresTreeQueryProvider
PostgreSQL tree query provider implementation.
Inherits from TreeQueryProviderBase and provides PostgreSQL-specific components.
public class PostgresTreeQueryProvider : TreeQueryProviderBase, ITreeQueryProvider, IRedbQueryProvider
Inheritance
Implements
Derived
Inherited Members
TreeQueryProviderBase.BuildPvtDistinctOnJson<TProps>(QueryContext<TProps>),TreeQueryProviderBase.Cache,TreeQueryProviderBase.CheckProOnlyDistinctFeatures<TProps>(QueryContext<TProps>),TreeQueryProviderBase.ConvertToTreeObject<TProps>(RedbObject<TProps>),TreeQueryProviderBase.CreateFacetBuilder(),TreeQueryProviderBase.CreateFilterParser(),TreeQueryProviderBase.CreateOrderingParser(),TreeQueryProviderBase.CreateQuery<TProps>(long, long?, bool),TreeQueryProviderBase.CreateQueryProvider(),TreeQueryProviderBase.CreateTreeQuery<TProps>(long, long?, bool, long?, int?),TreeQueryProviderBase.CreateTreeQueryable<TProps>(TreeQueryContext<TProps>),TreeQueryProviderBase.DeserializeTreeObjects<TProps>(string?),TreeQueryProviderBase.ExecuteAggregateAsync(long, string, AggregateFunction, FilterExpression?),TreeQueryProviderBase.ExecuteAggregateAsync(long, string, AggregateFunction, FilterExpression?, CancellationToken),TreeQueryProviderBase.ExecuteAggregateAsync(long, string, AggregateFunction, string?),TreeQueryProviderBase.ExecuteAggregateAsync(long, string, AggregateFunction, string?, CancellationToken),TreeQueryProviderBase.ExecuteAggregateBatchAsync(long, IEnumerable<AggregateRequest>, FilterExpression?),TreeQueryProviderBase.ExecuteAggregateBatchAsync(long, IEnumerable<AggregateRequest>, FilterExpression?, CancellationToken),TreeQueryProviderBase.ExecuteAggregateBatchAsync(long, IEnumerable<AggregateRequest>, string?),TreeQueryProviderBase.ExecuteAggregateBatchAsync(long, IEnumerable<AggregateRequest>, string?, CancellationToken),TreeQueryProviderBase.ExecuteArrayGroupedAggregateAsync(long, string, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, string?),TreeQueryProviderBase.ExecuteArrayGroupQueryAsync(ArrayGroupQuery, CancellationToken),TreeQueryProviderBase.ExecuteAsync(Expression, Type),TreeQueryProviderBase.ExecuteAsync(Expression, Type, CancellationToken),TreeQueryProviderBase.ExecuteDeleteAsync(long, FilterExpression?),TreeQueryProviderBase.ExecuteDeleteAsync(long, FilterExpression?, CancellationToken),TreeQueryProviderBase.ExecuteDeleteAsync(long, string?),TreeQueryProviderBase.ExecuteDeleteAsync(long, string?, CancellationToken),TreeQueryProviderBase.ExecuteGroupedAggregateAsync(long, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, FilterExpression?),TreeQueryProviderBase.ExecuteGroupedAggregateAsync(long, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, FilterExpression?, string?, CancellationToken),TreeQueryProviderBase.ExecuteGroupedAggregateAsync(long, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, string?),TreeQueryProviderBase.ExecuteGroupedAggregateAsync(long, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, string?, string?, CancellationToken),TreeQueryProviderBase.ExecuteGroupedWindowQueryAsync(long, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, FilterExpression?),TreeQueryProviderBase.ExecuteGroupedWindowQueryAsync(long, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, FilterExpression?, string?, CancellationToken),TreeQueryProviderBase.ExecuteGroupedWindowQueryAsync(long, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?),TreeQueryProviderBase.ExecuteGroupedWindowQueryAsync(long, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, string?, CancellationToken),TreeQueryProviderBase.ExecuteOptimizedWhereHasAncestor<TProps>(TreeQueryContext<TProps>, TreeFilter),TreeQueryProviderBase.ExecuteOptimizedWhereHasAncestor<TProps>(TreeQueryContext<TProps>, TreeFilter, CancellationToken),TreeQueryProviderBase.ExecuteOptimizedWhereHasDescendant<TProps>(TreeQueryContext<TProps>, TreeFilter),TreeQueryProviderBase.ExecuteOptimizedWhereHasDescendant<TProps>(TreeQueryContext<TProps>, TreeFilter, CancellationToken),TreeQueryProviderBase.ExecuteTreeAnyAsync<TProps>(TreeQueryContext<TProps>, CancellationToken),TreeQueryProviderBase.ExecuteTreeArrayGroupQueryAsync<TProps>(TreeQueryContext<TProps>, ArrayGroupQuery, CancellationToken),TreeQueryProviderBase.ExecuteTreeCountAsync<TProps>(TreeQueryContext<TProps>),TreeQueryProviderBase.ExecuteTreeCountAsync<TProps>(TreeQueryContext<TProps>, CancellationToken),TreeQueryProviderBase.ExecuteTreeDeleteAsync(long[]),TreeQueryProviderBase.ExecuteTreeDeleteAsync(long[], CancellationToken),TreeQueryProviderBase.ExecuteTreeGroupedAggregateAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>),TreeQueryProviderBase.ExecuteTreeGroupedAggregateAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, string?, CancellationToken),TreeQueryProviderBase.ExecuteTreeGroupedWindowQueryAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>),TreeQueryProviderBase.ExecuteTreeGroupedWindowQueryAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, CancellationToken),TreeQueryProviderBase.ExecuteTreeToListAsync<TProps>(TreeQueryContext<TProps>),TreeQueryProviderBase.ExecuteTreeToListAsync<TProps>(TreeQueryContext<TProps>, CancellationToken),TreeQueryProviderBase.ExecuteTreeWindowQueryAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?),TreeQueryProviderBase.ExecuteTreeWindowQueryAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, CancellationToken),TreeQueryProviderBase.ExecuteWindowQueryAsync(long, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, FilterExpression?, string?, int?, int?),TreeQueryProviderBase.ExecuteWindowQueryAsync(long, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, FilterExpression?, string?, int?, int?, CancellationToken),TreeQueryProviderBase.ExecuteWindowQueryAsync(long, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, string?, int?, int?),TreeQueryProviderBase.ExecuteWindowQueryAsync(long, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, string?, int?, int?, CancellationToken),TreeQueryProviderBase.FirstNodeProbe<TProps>(TreeQueryContext<TProps>),TreeQueryProviderBase.GetArrayGroupQuerySqlAsync(ArrayGroupQuery, CancellationToken),TreeQueryProviderBase.GetFilterJsonAsync<TProps>(QueryContext<TProps>),TreeQueryProviderBase.GetFilterJsonAsync<TProps>(QueryContext<TProps>, CancellationToken),TreeQueryProviderBase.GetGroupBySqlPreviewAsync(long, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, FilterExpression?, string?, CancellationToken),TreeQueryProviderBase.GetGroupBySqlPreviewAsync(long, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, string?, string?, CancellationToken),TreeQueryProviderBase.GetGroupedWindowSqlPreviewAsync(long, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, FilterExpression?),TreeQueryProviderBase.GetGroupedWindowSqlPreviewAsync(long, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, FilterExpression?, string?, CancellationToken),TreeQueryProviderBase.GetGroupedWindowSqlPreviewAsync(long, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?),TreeQueryProviderBase.GetGroupedWindowSqlPreviewAsync(long, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, string?, CancellationToken),TreeQueryProviderBase.GetIdsWithAncestorsAsync<TProps>(List<long>),TreeQueryProviderBase.GetIdsWithAncestorsAsync<TProps>(List<long>, CancellationToken),TreeQueryProviderBase.GetOptimizableHasAncestorFilter<TProps>(TreeQueryContext<TProps>),TreeQueryProviderBase.GetOptimizableHasDescendantFilter<TProps>(TreeQueryContext<TProps>),TreeQueryProviderBase.GetSchemeAsync(long),TreeQueryProviderBase.GetSchemeAsync(long, CancellationToken),TreeQueryProviderBase.GetSqlPreviewAsync<TProps>(TreeQueryContext<TProps>),TreeQueryProviderBase.GetSqlPreviewAsync<TProps>(TreeQueryContext<TProps>, CancellationToken),TreeQueryProviderBase.GetSqlPreviewAsync<TProps>(QueryContext<TProps>),TreeQueryProviderBase.GetSqlPreviewAsync<TProps>(QueryContext<TProps>, CancellationToken),TreeQueryProviderBase.GetTreeArrayGroupQuerySqlAsync<TProps>(TreeQueryContext<TProps>, ArrayGroupQuery, CancellationToken),TreeQueryProviderBase.GetTreeGroupBySqlPreviewAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>),TreeQueryProviderBase.GetTreeGroupBySqlPreviewAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, string?, CancellationToken),TreeQueryProviderBase.GetTreeGroupedWindowSqlPreviewAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>),TreeQueryProviderBase.GetTreeGroupedWindowSqlPreviewAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<GroupFieldRequest>, IEnumerable<AggregateRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, CancellationToken),TreeQueryProviderBase.GetTreeWindowSqlPreviewAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?),TreeQueryProviderBase.GetTreeWindowSqlPreviewAsync<TProps>(TreeQueryContext<TProps>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, CancellationToken),TreeQueryProviderBase.GetWindowSqlPreviewAsync(long, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, string?, int?, int?),TreeQueryProviderBase.GetWindowSqlPreviewAsync(long, IEnumerable<WindowFieldRequest>, IEnumerable<WindowFuncRequest>, IEnumerable<WindowFieldRequest>, IEnumerable<WindowOrderRequest>, string?, string?, int?, int?, CancellationToken),TreeQueryProviderBase.LoadObjectsByIdsAsync(List<long>, int?),TreeQueryProviderBase.LoadObjectsByIdsAsync(List<long>, int?, CancellationToken),TreeQueryProviderBase.LoadObjectsByIdsAsync<TProps>(List<long>, int?),TreeQueryProviderBase.LoadObjectsByIdsAsync<TProps>(List<long>, int?, CancellationToken),TreeQueryProviderBase.ShouldUseLazyLoading<TProps>(TreeQueryContext<TProps>),TreeQueryProviderBase.ShouldUseLazyLoading<TProps>(QueryContext<TProps>)
Methods
CreateFilterParser()
Creates PostgreSQL-specific filter expression parser.
protected override IFilterExpressionParser CreateFilterParser()
CreateQueryProvider()
Creates query provider for delegation.
protected override IRedbQueryProvider CreateQueryProvider()
CreateTreeQueryable<TProps>(TreeQueryContext<TProps>)
Creates tree queryable instance.
protected override IRedbQueryable<TProps> CreateTreeQueryable<TProps>(TreeQueryContext<TProps> context) where TProps : class, new()
ExecuteTreeCountAsync<TProps>(TreeQueryContext<TProps>, CancellationToken)
Execute COUNT for tree query through search_tree_objects_with_facets
protected override Task<int> ExecuteTreeCountAsync<TProps>(TreeQueryContext<TProps> context, CancellationToken cancellationToken = default) where TProps : class, new()
ExecuteTreeToListAsync<TProps>(TreeQueryContext<TProps>, CancellationToken)
Execute ToList for tree query through search_tree_objects_with_facets
protected override Task<object> ExecuteTreeToListAsync<TProps>(TreeQueryContext<TProps> context, CancellationToken cancellationToken = default) where TProps : class, new()
GetSqlPreviewAsync<TProps>(TreeQueryContext<TProps>, CancellationToken)
SQL preview of a tree query: the statement pvt_build_query_sql compiles for it, with
public override Task<string> GetSqlPreviewAsync<TProps>(TreeQueryContext<TProps> context, CancellationToken cancellationToken = default) where TProps : class, new()
WithIdsInstead<TProps>(TreeQueryContext<TProps>, TreeFilter, IReadOnlyCollection<long>)
The query without treeFilter, its object id confined to ids.
protected static TreeQueryContext<TProps> WithIdsInstead<TProps>(TreeQueryContext<TProps> context, TreeFilter treeFilter, IReadOnlyCollection<long> ids) where TProps : class, new()