Skip to content

ExplainAsync Method ​

Definition ​

  • Namespace: JASE.Database
  • Assembly: JASE.Database.dll

Overloads ​

NameDescription
Task<QueryPlanResult> ExplainAsync(ISqlStatement statement, QueryPlanOptions options = null, CancellationToken cancellationToken = null)Requests an explain / showplan for the specified statement and returns a normalized result.
Task<QueryPlanResult> ExplainAsync(string command, IReadOnlyList<IParameter> parameters = null, QueryPlanOptions options = null, CancellationToken cancellationToken = null)Requests an explain / showplan for the specified SQL text and returns a normalized result.

Task<QueryPlanResult> ExplainAsync(ISqlStatement statement, QueryPlanOptions options = null, CancellationToken cancellationToken = null) ​

csharp
Task<QueryPlanResult> ExplainAsync(ISqlStatement statement, QueryPlanOptions options = null, CancellationToken cancellationToken = null)

Requests an explain / showplan for the specified statement and returns a normalized result.

Parameters ​

NameDescription
cancellationTokenToken used to cancel the operation.
optionsExplain options; defaults to estimated plan only when null.
statementPrepared SQL statement to explain.

Returns ​

A QueryPlanResult containing the engine-native plan payload and a best-effort normalized tree when parsing succeeds.

Remarks ​

Actual executes the statement (writes, locks, and side effects apply). Supported for PostgreSQL and SQL Server.

Task<QueryPlanResult> ExplainAsync(string command, IReadOnlyList<IParameter> parameters = null, QueryPlanOptions options = null, CancellationToken cancellationToken = null) ​

csharp
Task<QueryPlanResult> ExplainAsync(string command, IReadOnlyList<IParameter> parameters = null, QueryPlanOptions options = null, CancellationToken cancellationToken = null)

Requests an explain / showplan for the specified SQL text and returns a normalized result.

Parameters ​

NameDescription
cancellationTokenToken used to cancel the operation.
commandSQL command text to explain (without an explain wrapper).
optionsExplain options; defaults to estimated plan only when null.
parametersParameters to bind to the command, if any.

Returns ​

A QueryPlanResult containing the engine-native plan payload and a best-effort normalized tree when parsing succeeds.

Remarks ​

Actual executes the statement (writes, locks, and side effects apply). Supported for PostgreSQL and SQL Server.