Share via


RelationalQueryableMethodTranslatingExpressionVisitor.IsValidSelectExpressionForExecuteDelete Method

Definition

Overloads

IsValidSelectExpressionForExecuteDelete(SelectExpression, EntityShaperExpression, TableExpression)

Checks weather the current select expression can be used as-is for execute a delete operation, or whether it must be pushed down into a subquery.

IsValidSelectExpressionForExecuteDelete(SelectExpression, StructuralTypeShaperExpression, TableExpression)

Checks weather the current select expression can be used as-is for executing a delete operation, or whether it must be pushed down into a subquery.

IsValidSelectExpressionForExecuteDelete(SelectExpression, EntityShaperExpression, TableExpression)

Source:
RelationalQueryableMethodTranslatingExpressionVisitor.cs

Checks weather the current select expression can be used as-is for execute a delete operation, or whether it must be pushed down into a subquery.

protected virtual bool IsValidSelectExpressionForExecuteDelete (Microsoft.EntityFrameworkCore.Query.SqlExpressions.SelectExpression selectExpression, Microsoft.EntityFrameworkCore.Query.EntityShaperExpression entityShaperExpression, out Microsoft.EntityFrameworkCore.Query.SqlExpressions.TableExpression? tableExpression);
abstract member IsValidSelectExpressionForExecuteDelete : Microsoft.EntityFrameworkCore.Query.SqlExpressions.SelectExpression * Microsoft.EntityFrameworkCore.Query.EntityShaperExpression * TableExpression -> bool
override this.IsValidSelectExpressionForExecuteDelete : Microsoft.EntityFrameworkCore.Query.SqlExpressions.SelectExpression * Microsoft.EntityFrameworkCore.Query.EntityShaperExpression * TableExpression -> bool
Protected Overridable Function IsValidSelectExpressionForExecuteDelete (selectExpression As SelectExpression, entityShaperExpression As EntityShaperExpression, ByRef tableExpression As TableExpression) As Boolean

Parameters

selectExpression
SelectExpression

The select expression to validate.

entityShaperExpression
EntityShaperExpression

The entity shaper expression on which the delete operation is being applied.

tableExpression
TableExpression

The table expression from which rows are being deleted.

Returns

Returns true if the current select expression can be used for delete as-is, false otherwise.

Remarks

By default, only single-table select expressions are supported, and optionally with a predicate.

Providers can override this to allow more select expression features to be supported without pushing down into a subquery. When doing this, VisitDelete must also be overridden in the provider's QuerySqlGenerator to add SQL generation support for the feature.

Applies to

IsValidSelectExpressionForExecuteDelete(SelectExpression, StructuralTypeShaperExpression, TableExpression)

Source:
RelationalQueryableMethodTranslatingExpressionVisitor.cs
Source:
RelationalQueryableMethodTranslatingExpressionVisitor.ExecuteDelete.cs

Checks weather the current select expression can be used as-is for executing a delete operation, or whether it must be pushed down into a subquery.

protected virtual bool IsValidSelectExpressionForExecuteDelete (Microsoft.EntityFrameworkCore.Query.SqlExpressions.SelectExpression selectExpression, Microsoft.EntityFrameworkCore.Query.StructuralTypeShaperExpression shaper, out Microsoft.EntityFrameworkCore.Query.SqlExpressions.TableExpression? tableExpression);
abstract member IsValidSelectExpressionForExecuteDelete : Microsoft.EntityFrameworkCore.Query.SqlExpressions.SelectExpression * Microsoft.EntityFrameworkCore.Query.StructuralTypeShaperExpression * TableExpression -> bool
override this.IsValidSelectExpressionForExecuteDelete : Microsoft.EntityFrameworkCore.Query.SqlExpressions.SelectExpression * Microsoft.EntityFrameworkCore.Query.StructuralTypeShaperExpression * TableExpression -> bool
Protected Overridable Function IsValidSelectExpressionForExecuteDelete (selectExpression As SelectExpression, shaper As StructuralTypeShaperExpression, ByRef tableExpression As TableExpression) As Boolean

Parameters

selectExpression
SelectExpression

The select expression to validate.

shaper
StructuralTypeShaperExpression

The structural type shaper expression on which the delete operation is being applied.

tableExpression
TableExpression

The table expression from which rows are being deleted.

Returns

Returns true if the current select expression can be used for delete as-is, false otherwise.

Remarks

By default, only single-table select expressions are supported, and optionally with a predicate.

Providers can override this to allow more select expression features to be supported without pushing down into a subquery. When doing this, VisitDelete must also be overridden in the provider's QuerySqlGenerator to add SQL generation support for the feature.

Applies to