Share via


RelationalQueryableMethodTranslatingExpressionVisitor.IsValidSelectExpressionForExecuteUpdate Method

Definition

Overloads

IsValidSelectExpressionForExecuteUpdate(SelectExpression, EntityShaperExpression, TableExpression)

Validates if the current select expression can be used for execute update operation or it requires to be joined as a subquery.

IsValidSelectExpressionForExecuteUpdate(SelectExpression, TableExpressionBase, TableExpression)

Validates if the current select expression can be used for execute update operation or it requires to be joined as a subquery.

IsValidSelectExpressionForExecuteUpdate(SelectExpression, EntityShaperExpression, TableExpression)

Validates if the current select expression can be used for execute update operation or it requires to be joined as a subquery.

protected virtual bool IsValidSelectExpressionForExecuteUpdate (Microsoft.EntityFrameworkCore.Query.SqlExpressions.SelectExpression selectExpression, Microsoft.EntityFrameworkCore.Query.EntityShaperExpression entityShaperExpression, out Microsoft.EntityFrameworkCore.Query.SqlExpressions.TableExpression? tableExpression);
abstract member IsValidSelectExpressionForExecuteUpdate : Microsoft.EntityFrameworkCore.Query.SqlExpressions.SelectExpression * Microsoft.EntityFrameworkCore.Query.EntityShaperExpression * TableExpression -> bool
override this.IsValidSelectExpressionForExecuteUpdate : Microsoft.EntityFrameworkCore.Query.SqlExpressions.SelectExpression * Microsoft.EntityFrameworkCore.Query.EntityShaperExpression * TableExpression -> bool
Protected Overridable Function IsValidSelectExpressionForExecuteUpdate (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 update 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 update as-is, false otherwise.

Remarks

By default, only muli-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, VisitUpdate must also be overridden in the provider's QuerySqlGenerator to add SQL generation support for the feature.

Applies to

IsValidSelectExpressionForExecuteUpdate(SelectExpression, TableExpressionBase, TableExpression)

Validates if the current select expression can be used for execute update operation or it requires to be joined as a subquery.

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

Parameters

selectExpression
SelectExpression

The select expression to validate.

targetTable
TableExpressionBase

The target table containing the rows to be updated.

tableExpression
TableExpression

The table expression corresponding to the provided targetTable, containing the rows to be updated.

Returns

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

Remarks

By default, only multi-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, VisitUpdate must also be overridden in the provider's QuerySqlGenerator to add SQL generation support for the feature.

Applies to