Skip to main content

QueryPlanContext

  • Namespace: PPDS.Dataverse.Query.Planning
  • Assembly: PPDS.Dataverse
  • Kind: Class

Summary​

Shared context for plan execution: pool, cancellation, statistics.

Members​

Constructors​

QueryPlanContext(IQueryExecutor queryExecutor, CancellationToken cancellationToken, QueryPlanStatistics statistics, IQueryProgressReporter progressReporter, ITdsQueryExecutor tdsQueryExecutor, IMetadataQueryExecutor metadataQueryExecutor, IBulkOperationExecutor bulkOperationExecutor, VariableScope variableScope, int maxMaterializationRows, QueryExecutionOptions executionOptions, ICachedMetadataProvider metadataProvider)​

QueryPlanContext(IQueryExecutor queryExecutor, CancellationToken cancellationToken, QueryPlanStatistics statistics, IQueryProgressReporter progressReporter, ITdsQueryExecutor tdsQueryExecutor, IMetadataQueryExecutor metadataQueryExecutor, IBulkOperationExecutor bulkOperationExecutor, VariableScope variableScope, int maxMaterializationRows, QueryExecutionOptions executionOptions, ICachedMetadataProvider metadataProvider)

Initializes a new instance of the PPDS.Dataverse.Query.Planning.QueryPlanContext class.

Properties​

BulkOperationExecutor​

IBulkOperationExecutor BulkOperationExecutor { get; }

Optional bulk operation executor for DML operations (INSERT, UPDATE, DELETE).

CancellationToken​

CancellationToken CancellationToken { get; }

Cancellation token for the entire plan execution.

ExecutionOptions​

QueryExecutionOptions ExecutionOptions { get; }

Per-query execution options (bypass plugins/flows). Null means no overrides. Consumed by PPDS.Dataverse.Query.Planning.Nodes.FetchXmlScanNode when calling PPDS.Dataverse.Query.IQueryExecutor.ExecuteFetchXmlAsync(System.String,System.Nullable<System.Int32>,System.String,System.Boolean,PPDS.Dataverse.Query.QueryExecutionOptions,System.Threading.CancellationToken).

MaxMaterializationRows​

int MaxMaterializationRows { get; }

Maximum rows a node may materialize in memory (e.g., for sorting or aggregation). Default is 500,000. Set to 0 for unlimited.

MetadataProvider​

ICachedMetadataProvider MetadataProvider { get; }

Optional cached metadata provider. When supplied, DML nodes use this to coerce SQL literals into Dataverse SDK types (EntityReference, OptionSetValue, etc.) for lookup, choice, and money attributes. Null disables coercion (raw CLR values are passed through to Entity[attr]).

MetadataQueryExecutor​

IMetadataQueryExecutor MetadataQueryExecutor { get; }

Optional metadata query executor for metadata virtual tables (Phase 6).

ProgressReporter​

IQueryProgressReporter ProgressReporter { get; }

Optional progress reporter for long-running operations.

QueryExecutor​

IQueryExecutor QueryExecutor { get; }

Connection pool for executing FetchXML queries.

Statistics​

QueryPlanStatistics Statistics { get; }

Mutable statistics: nodes report actual row counts and timing.

TdsQueryExecutor​

ITdsQueryExecutor TdsQueryExecutor { get; }

Optional TDS Endpoint executor for direct SQL execution (Phase 3.5).

VariableScope​

VariableScope VariableScope { get; }

Optional variable scope for resolving @variable references in expressions.