Reference > Configuration > Runtime

Delete Execution Pipeline Events

core concept: delete execution pipeline

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.
syntax examples

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 Delete Start (Synchronous)

The first Delete-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

OnBeforeDeleteStart({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.
syntax examples

After Delete 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

OnAfterDeleteAssembly({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 Delete 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

OnBeforeDeleteCommand({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 Delete 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

OnAfterDeleteCommand({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 Delete Complete (Synchronous)

Event published after a SQL statement has been executed.

Syntax

OnAfterDeleteComplete({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.
syntax examples

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.
syntax examples

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 Delete Start (Asynchronous)

The first Delete-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

OnBeforeDeleteStart({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.
syntax examples

After Delete Assembly (Asynchronous)

Event published after a SQL statement is assembled from the QueryExpression and before the OnAfterAssembly event is published.

Syntax

OnAfterDeleteAssembly({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 Delete 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

OnBeforeDeleteCommand({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 Delete 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

OnAfterDeleteCommand({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 Delete Complete (Asynchronous)

Event published after a SQL statement has been executed.

Syntax

OnAfterDeleteComplete({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.
Previous
Update Pipeline Events

© 2024 dbExpression. All rights reserved.