Appearance
ExplainAsync Method
Definition
- Namespace:
JASE.Database - Assembly:
JASE.Database.dll
Overloads
| Name | Description |
|---|---|
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
| Name | Description |
|---|---|
cancellationToken | Token used to cancel the operation. |
options | Explain options; defaults to estimated plan only when null. |
statement | Prepared 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
| Name | Description |
|---|---|
cancellationToken | Token used to cancel the operation. |
command | SQL command text to explain (without an explain wrapper). |
options | Explain options; defaults to estimated plan only when null. |
parameters | Parameters 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.