Reference > Configuration > Runtime
Select Execution Pipeline Events
Before Start (Synchronous)
The first event published, it is published before a SQL statement is assembled from the QueryExpression
. This event should be used to apply any query-specifics to the QueryExpression
that need to be applied immediately after Execute
or ExecuteAsync
is invoked.
Syntax
OnBeforeStart({action}[,{shouldInvokeAction}])
Arguments
- action
- – A delegate receiving event-specific context. The provided delegate is invoked before a SQL statement is assembled.
- shouldInvokeAction
- – Invoked to determine if `action` should be invoked, a filter on the event subscription.
After Assembly (Synchronous)
Event published after a SQL statement is assembled from the QueryExpression
and after all query-specific after assembly subscribers have received the query-specific after assembly event publication.
Syntax
OnAfterAssembly({action}[,{shouldInvokeAction}])
Arguments
- action
- – A delegate receiving event-specific context.
- shouldInvokeAction
- – Invoked to determine if `action` should be invoked, a filter on the event subscription.
Before Command (Synchronous)
Event published before a command is executed against the database and before the query-specific before command event is published.
Syntax
OnBeforeCommand({action}[,{shouldInvokeAction}])
Arguments
- action
- – A delegate receiving event-specific context. The provided delegate is invoked before a SQL statement is executed against the database.
- shouldInvokeAction
- – Invoked to determine if `action` should be invoked, a filter on the event subscription.
After Command (Synchronous)
Event published after a command is executed against the database and after the query-specific after command event is published.
Subscribe to this event only if you need access to the command after execution of the SQL statement. The command (and any data readers) are still open.
Syntax
OnAfterCommand({action}[,{shouldInvokeAction}])
Arguments
- action
- – A delegate receiving event-specific context. The provided delegate is invoked after a command has been executed.
- shouldInvokeAction
- – Invoked to determine if `action` should be invoked, a filter on the event subscription.
After Complete (Synchronous)
Event published after the pipeline has completed all work, this is the last event published.
Syntax
OnAfterComplete({action}[,{shouldInvokeAction}])
Arguments
- action
- – A delegate receiving event-specific context. The provided delegate is invoked after the pipeline has completed all work.
- shouldInvokeAction
- – Invoked to determine if `action` should be invoked, a filter on the event subscription.
Before Select Start (Synchronous)
The first Select-specific event published, it is published before a SQL statement is assembled from the QueryExpression
and after all BeforeStart
subscribers have received the BeforeStart
event publication. This event should be used to apply any query-specifics to the QueryExpression
that need to be applied immediately after Execute
or ExecuteAsync
is invoked on the query.
Syntax
OnBeforeSelectStart({action}[,{shouldInvokeAction}])
Arguments
- action
- – A delegate receiving event-specific context. The provided delegate is invoked *before* a SQL statement is assembled.
- shouldInvokeAction
- – Invoked to determine if `action` should be invoked, a filter on the event subscription.
After Select Assembly (Synchronous)
Event published after a SQL statement is assembled from the QueryExpression
and after all OnAfterAssembly
subscribers have received the OnAfterAssembly
event publication.
Syntax
OnAfterSelectAssembly({action}[,{shouldInvokeAction}])
Arguments
- action
- – A delegate receiving event-specific context.
- shouldInvokeAction
- – Invoked to determine if `action` should be invoked, a filter on the event subscription.
Before Select Command (Synchronous)
Event published before a command is executed against the database and after the OnBeforeCommand
event was published. This is the last event published before the command is executed against the database.
Syntax
OnBeforeSelectCommand({action}[,{shouldInvokeAction}])
Arguments
- action
- – A delegate receiving event-specific context. The provided delegate is invoked *before* a SQL statement is executed against the database.
- shouldInvokeAction
- – Invoked to determine if `action` should be invoked, a filter on the event subscription.
After Select Command (Synchronous)
Event published after a command is executed against the database and after the OnAfterCommand
event publication.
Subscribe to this event only if you need access to the command after execution of the SQL statement. The command (and any data readers) are still open.
Syntax
OnAfterSelectCommand({action}[,{shouldInvokeAction}])
Arguments
- action
- – A delegate receiving event-specific context. The provided delegate is invoked *after* a command has been executed.
- shouldInvokeAction
- – Invoked to determine if `action` should be invoked, a filter on the event subscription.
After Select Complete (Synchronous)
Event published after a SQL statement has been executed.
Syntax
OnAfterSelectComplete({action}[,{shouldInvokeAction}])
Arguments
- action
- – A delegate receiving event-specific context. The provided delegate is invoked *after* the pipeline has completed all work.
- shouldInvokeAction
- – Invoked to determine if `action` should be invoked, a filter on the event subscription.
Before Start (Asynchronous)
Event published before a SQL statement is assembled from the QueryExpression
. The parameter builder is available (no parameters have been created). This event should be used to apply any query-specifics to the QueryExpression
that need to be applied immediately after Execute
or ExecuteAsync
is invoked on the query.
Syntax
OnBeforeStart({action}[,{shouldInvokeAction}][,{cancellationToken}])
Arguments
- action
- – A delegate receiving event-specific context. The provided delegate is invoked before a SQL statement is assembled.
- shouldInvokeAction
- – Invoked to determine if `action` should be invoked, a filter on the event subscription.
- cancellationToken
- – A cancellation token that will be checked occassionally as the pipeline progresses. An `OperationCanceledException` will be thrown if the token is cancelled.
After Assembly (Asynchronous)
Event published after a SQL statement is assembled from the QueryExpression
. Changes made to the QueryExpression
will NOT effect the SQL statement. The SQL statement has been assembled and any/all parameters have been created for the SQL statement. The parameter builder is available in this event, and should be used to create/add additional parameters for any additional text appended to the SQL statements command text writer.
Syntax
OnAfterAssembly({action}[,{shouldInvokeAction}][,{cancellationToken}])
Arguments
- action
- – A delegate receiving event-specific context. The provided delegate is invoked *after* a SQL statement is assembled.
- shouldInvokeAction
- – Invoked to determine if `action` should be invoked, a filter on the event subscription.
- cancellationToken
- – A cancellation token that will be checked occassionally as the pipeline progresses. An `OperationCanceledException` will be thrown if the token is cancelled.
Before Command (Asynchronous)
Event published before a database command is executed against the database. The command text can be overwritten, or the command text writer can have text appended. Parameters have been set on the command prior to this event publication.
Syntax
OnBeforeCommand({action}[,{shouldInvokeAction}][,{cancellationToken}])
Arguments
- action
- shouldInvokeAction
- cancellationToken
After Command (Asynchronous)
Event published after a command has been executed against the database.
Subscribe to this event only if you need access to the command after execution of the SQL statement. The command (and any data readers) are still open.
Syntax
OnAfterCommand({action}[,{shouldInvokeAction}][,{cancellationToken}])
Arguments
- action
- – A delegate receiving event-specific context. The provided delegate is invoked *after* a command has been executed.
- shouldInvokeAction
- – Invoked to determine if `action` should be invoked, a filter on the event subscription.
- cancellationToken
- – A cancellation token that will be checked occassionally as the pipeline progresses. An `OperationCanceledException` will be thrown if the token is cancelled.
After Complete (Asynchronous)
The final event published. This is a good event to subscribe to for needs that apply to all queries and they are only published after successful execution of the SQL statement.
Syntax
OnAfterComplete({action}[,{shouldInvokeAction}][,{cancellationToken}])
Arguments
- action
- – A delegate receiving event-specific context.
- shouldInvokeAction
- – Invoked to determine if `action` should be invoked, a filter on the event subscription.
- cancellationToken
- – A cancellation token that will be checked occassionally as the pipeline progresses. An `OperationCanceledException` will be thrown if the token is cancelled.
Before Select Start (Asynchronous)
The first Select-specific event published, it is published before a SQL statement is assembled from the QueryExpression
and after all BeforeStart
subscribers have received the BeforeStart
event publication. This event should be used to apply any query-specifics to the QueryExpression
that need to be applied immediately after Execute
or ExecuteAsync
is invoked on the query.
Syntax
OnBeforeSelectStart({action}[,{shouldInvokeAction}][,{cancellationToken}])
Arguments
- action
- – A delegate receiving event-specific context. The provided delegate is invoked *before* a SQL statement is assembled.
- shouldInvokeAction
- – Invoked to determine if `action` should be invoked, a filter on the event subscription.
- cancellationToken
- – A cancellation token that will be checked occassionally as the pipeline progresses. An `OperationCanceledException` will be thrown if the token is cancelled.
After Select Assembly (Asynchronous)
Event published after a SQL statement is assembled from the QueryExpression
and after all OnAfterAssembly
subscribers have received the OnAfterAssembly
event publication.
Syntax
OnAfterSelectAssembly({action}[,{shouldInvokeAction}][,{cancellationToken}])
Arguments
- action
- – A delegate receiving event-specific context.
- shouldInvokeAction
- – Invoked to determine if `action` should be invoked, a filter on the event subscription.
- cancellationToken
- – A cancellation token that will be checked occassionally as the pipeline progresses. An `OperationCanceledException` will be thrown if the token is cancelled.
Before Select Command (Asynchronous)
Event published before a command is executed against the database and after the OnBeforeCommand
event was published. This is the last event published before the command is executed against the database.
Syntax
OnBeforeSelectCommand({action}[,{shouldInvokeAction}][,{cancellationToken}])
Arguments
- action
- – A delegate receiving event-specific context. The provided delegate is invoked *before* a SQL statement is executed against the database.
- shouldInvokeAction
- – Invoked to determine if `action` should be invoked, a filter on the event subscription.
- cancellationToken
- – A cancellation token that will be checked occassionally as the pipeline progresses. An `OperationCanceledException` will be thrown if the token is cancelled.
After Select Command (Asynchronous)
Event published after a command is executed against the database and after the OnAfterCommand
event publication.
Subscribe to this event only if you need access to the command after execution of the SQL statement. The command (and any data readers) are still open.
Syntax
OnAfterSelectCommand({action}[,{shouldInvokeAction}][,{cancellationToken}])
Arguments
- action
- – A delegate receiving event-specific context. The provided delegate is invoked *after* a command has been executed.
- shouldInvokeAction
- – Invoked to determine if `action` should be invoked, a filter on the event subscription.
- cancellationToken
- – A cancellation token that will be checked occassionally as the pipeline progresses. An `OperationCanceledException` will be thrown if the token is cancelled.
After Select Complete (Asynchronous)
Event published after a SQL statement has been executed.
Syntax
OnAfterSelectComplete({action}[,{shouldInvokeAction}][,{cancellationToken}])
Arguments
- action
- – A delegate receiving event-specific context.
- shouldInvokeAction
- – Invoked to determine if `action` should be invoked, a filter on the event subscription.
- cancellationToken
- – A cancellation token that will be checked occassionally as the pipeline progresses. An `OperationCanceledException` will be thrown if the token is cancelled.