UpdateAndSelectSqlGenerator Class

Definition

A base class for the IUpdateSqlGenerator service that is typically inherited from by database providers. The implementation uses a separate SELECT query after the update SQL to retrieve any database-generated values or for concurrency checking.

This type is typically used by database providers; it is generally not used in application code.

public abstract class UpdateAndSelectSqlGenerator : Microsoft.EntityFrameworkCore.Update.UpdateSqlGenerator
type UpdateAndSelectSqlGenerator = class
    inherit UpdateSqlGenerator
Public MustInherit Class UpdateAndSelectSqlGenerator
Inherits UpdateSqlGenerator
Inheritance
UpdateAndSelectSqlGenerator

Remarks

The service lifetime is Singleton. This means a single instance is used by many DbContext instances. The implementation must be thread-safe. This service cannot depend on services registered as Scoped.

See Implementation of database providers and extensions for more information and examples.

Constructors

UpdateAndSelectSqlGenerator(UpdateSqlGeneratorDependencies)

Initializes a new instance of this class.

Properties

Dependencies

Relational provider-specific dependencies for this service.

(Inherited from UpdateSqlGenerator)
SqlGenerationHelper

Helpers for generating update SQL.

(Inherited from UpdateSqlGenerator)

Methods

AppendBatchHeader(StringBuilder)

Appends SQL text that defines the start of a batch.

(Inherited from UpdateSqlGenerator)
AppendDeleteAndSelectOperation(StringBuilder, IReadOnlyModificationCommand, Int32, Boolean)

Appends SQL for updating a row to the commands being built, via a DELETE followed by a SELECT for concurrency checking.

AppendDeleteCommand(StringBuilder, String, String, IReadOnlyList<ColumnModification>)

Appends a SQL command for deleting a row to the commands being built.

(Inherited from UpdateSqlGenerator)
AppendDeleteCommand(StringBuilder, String, String, IReadOnlyList<IColumnModification>)

Appends a SQL command for deleting a row to the commands being built.

(Inherited from UpdateSqlGenerator)
AppendDeleteCommand(StringBuilder, String, String, IReadOnlyList<IColumnModification>, IReadOnlyList<IColumnModification>, Boolean)

Appends a SQL command for deleting a row to the commands being built.

(Inherited from UpdateSqlGenerator)
AppendDeleteCommandHeader(StringBuilder, String, String)

Appends a SQL fragment for starting a DELETE.

(Inherited from UpdateSqlGenerator)
AppendDeleteOperation(StringBuilder, IReadOnlyModificationCommand, Int32)

Appends a SQL command for deleting a row to the commands being built.

(Inherited from UpdateSqlGenerator)
AppendDeleteOperation(StringBuilder, IReadOnlyModificationCommand, Int32, Boolean) System.Object.AppendDeleteOperation(System.Text.StringBuilder,Microsoft.EntityFrameworkCore.Update.IReadOnlyModificationCommand,System.Int32,System.Boolean@)
AppendDeleteOperation(StringBuilder, ModificationCommand, Int32)

Appends a SQL command for deleting a row to the commands being built.

(Inherited from UpdateSqlGenerator)
AppendDeleteReturningOperation(StringBuilder, IReadOnlyModificationCommand, Int32, Boolean)

Appends SQL for deleting a row to the commands being built, via a DELETE containing a RETURNING clause for concurrency checking.

(Inherited from UpdateSqlGenerator)
AppendFromClause(StringBuilder, String, String)

Appends a SQL fragment for starting a FROM clause.

AppendIdentityWhereCondition(StringBuilder, ColumnModification)

Appends a WHERE condition for the identity (i.e. key value) of the given column.

(Inherited from UpdateSqlGenerator)
AppendIdentityWhereCondition(StringBuilder, IColumnModification)

Appends a WHERE condition for the identity (i.e. key value) of the given column.

AppendInsertAndSelectOperation(StringBuilder, IReadOnlyModificationCommand, Int32, Boolean)

Appends SQL for inserting a row to the commands being built, via an INSERT followed by an optional SELECT to retrieve any database-generated values.

AppendInsertAndSelectOperations(StringBuilder, IReadOnlyModificationCommand, Int32, Boolean)

Appends SQL for inserting a row to the commands being built, via an INSERT followed by an optional SELECT to retrieve any database-generated values.

AppendInsertCommand(StringBuilder, String, String, IReadOnlyList<ColumnModification>)

Appends a SQL command for inserting a row to the commands being built.

(Inherited from UpdateSqlGenerator)
AppendInsertCommand(StringBuilder, String, String, IReadOnlyList<IColumnModification>)

Appends a SQL command for inserting a row to the commands being built.

(Inherited from UpdateSqlGenerator)
AppendInsertCommand(StringBuilder, String, String, IReadOnlyList<IColumnModification>, IReadOnlyList<IColumnModification>)

Appends a SQL command for inserting a row to the commands being built.

(Inherited from UpdateSqlGenerator)
AppendInsertCommandHeader(StringBuilder, String, String, IReadOnlyList<ColumnModification>)

Appends a SQL fragment for starting an INSERT.

(Inherited from UpdateSqlGenerator)
AppendInsertCommandHeader(StringBuilder, String, String, IReadOnlyList<IColumnModification>)

Appends a SQL fragment for starting an INSERT.

(Inherited from UpdateSqlGenerator)
AppendInsertOperation(StringBuilder, IReadOnlyModificationCommand, Int32)

Appends a SQL command for inserting a row to the commands being built.

(Inherited from UpdateSqlGenerator)
AppendInsertOperation(StringBuilder, IReadOnlyModificationCommand, Int32, Boolean) System.Object.AppendInsertOperation(System.Text.StringBuilder,Microsoft.EntityFrameworkCore.Update.IReadOnlyModificationCommand,System.Int32,System.Boolean@)
AppendInsertOperation(StringBuilder, ModificationCommand, Int32)

Appends a SQL command for inserting a row to the commands being built.

(Inherited from UpdateSqlGenerator)
AppendInsertReturningOperation(StringBuilder, IReadOnlyModificationCommand, Int32, Boolean)

Appends SQL for inserting a row to the commands being built, via an INSERT containing an optional RETURNING clause to retrieve any database-generated values.

(Inherited from UpdateSqlGenerator)
AppendNextSequenceValueOperation(StringBuilder, String, String)

Generates a SQL fragment that will get the next value from the given sequence and appends it to the full command being built by the given StringBuilder.

(Inherited from UpdateSqlGenerator)
AppendObtainNextSequenceValueOperation(StringBuilder, String, String)

Generates a SQL fragment that will get the next value from the given sequence and appends it to the full command being built by the given StringBuilder.

(Inherited from UpdateSqlGenerator)
AppendReturningClause(StringBuilder, IReadOnlyList<IColumnModification>, String)

Appends a clause used to return generated values from an INSERT or UPDATE statement.

(Inherited from UpdateSqlGenerator)
AppendRowsAffectedWhereCondition(StringBuilder, Int32)

Appends a WHERE condition checking rows affected.

AppendSelectAffectedCommand(StringBuilder, String, String, IReadOnlyList<ColumnModification>, IReadOnlyList<ColumnModification>, Int32)

Appends a SQL command for selecting affected data.

(Inherited from UpdateSqlGenerator)
AppendSelectAffectedCommand(StringBuilder, String, String, IReadOnlyList<IColumnModification>, IReadOnlyList<IColumnModification>, Int32)

Appends a SQL command for selecting affected data.

AppendSelectAffectedCountCommand(StringBuilder, String, String, Int32)

Appends a SQL command for selecting the number of rows affected.

AppendSelectCommandHeader(StringBuilder, IReadOnlyList<ColumnModification>)

Appends a SQL fragment for starting an SELECT.

(Inherited from UpdateSqlGenerator)
AppendSelectCommandHeader(StringBuilder, IReadOnlyList<IColumnModification>)

Appends a SQL fragment for starting a SELECT.

AppendStoredProcedureCall(StringBuilder, IReadOnlyModificationCommand, Int32, Boolean)

Appends SQL for calling a stored procedure.

(Inherited from UpdateSqlGenerator)
AppendUpdateAndSelectOperation(StringBuilder, IReadOnlyModificationCommand, Int32, Boolean)

Appends SQL for updating a row to the commands being built, via an UPDATE followed by a SELECT to retrieve any database-generated values or for concurrency checking.

AppendUpdateColumnValue(ISqlGenerationHelper, IColumnModification, StringBuilder, String, String)

Appends a SQL fragment representing the value that is assigned to a column which is being updated.

(Inherited from UpdateSqlGenerator)
AppendUpdateCommand(StringBuilder, String, String, IReadOnlyList<ColumnModification>, IReadOnlyList<ColumnModification>)

Appends a SQL command for updating a row to the commands being built.

(Inherited from UpdateSqlGenerator)
AppendUpdateCommand(StringBuilder, String, String, IReadOnlyList<IColumnModification>, IReadOnlyList<IColumnModification>)

Appends a SQL command for updating a row to the commands being built.

(Inherited from UpdateSqlGenerator)
AppendUpdateCommand(StringBuilder, String, String, IReadOnlyList<IColumnModification>, IReadOnlyList<IColumnModification>, IReadOnlyList<IColumnModification>, Boolean)

Appends a SQL command for updating a row to the commands being built.

(Inherited from UpdateSqlGenerator)
AppendUpdateCommandHeader(StringBuilder, String, String, IReadOnlyList<ColumnModification>)

Appends a SQL fragment for starting an UPDATE.

(Inherited from UpdateSqlGenerator)
AppendUpdateCommandHeader(StringBuilder, String, String, IReadOnlyList<IColumnModification>)

Appends a SQL fragment for starting an UPDATE.

(Inherited from UpdateSqlGenerator)
AppendUpdateOperation(StringBuilder, IReadOnlyModificationCommand, Int32)

Appends a SQL command for updating a row to the commands being built.

(Inherited from UpdateSqlGenerator)
AppendUpdateOperation(StringBuilder, IReadOnlyModificationCommand, Int32, Boolean) System.Object.AppendUpdateOperation(System.Text.StringBuilder,Microsoft.EntityFrameworkCore.Update.IReadOnlyModificationCommand,System.Int32,System.Boolean@)
AppendUpdateOperation(StringBuilder, ModificationCommand, Int32)

Appends a SQL command for updating a row to the commands being built.

(Inherited from UpdateSqlGenerator)
AppendUpdateReturningOperation(StringBuilder, IReadOnlyModificationCommand, Int32, Boolean)

Appends SQL for updating a row to the commands being built, via an UPDATE containing an RETURNING clause to retrieve any database-generated values or for concurrency checking.

(Inherited from UpdateSqlGenerator)
AppendValues(StringBuilder, IReadOnlyList<ColumnModification>)

Appends values after a AppendValuesHeader(StringBuilder, IReadOnlyList<ColumnModification>) call.

(Inherited from UpdateSqlGenerator)
AppendValues(StringBuilder, String, String, IReadOnlyList<ColumnModification>)

Appends values after a AppendValuesHeader(StringBuilder, IReadOnlyList<ColumnModification>) call.

(Inherited from UpdateSqlGenerator)
AppendValues(StringBuilder, String, String, IReadOnlyList<IColumnModification>)

Appends values after a AppendValuesHeader(StringBuilder, IReadOnlyList<IColumnModification>) call.

(Inherited from UpdateSqlGenerator)
AppendValuesHeader(StringBuilder, IReadOnlyList<ColumnModification>)

Appends a SQL fragment for a VALUES.

(Inherited from UpdateSqlGenerator)
AppendValuesHeader(StringBuilder, IReadOnlyList<IColumnModification>)

Appends a SQL fragment for a VALUES.

(Inherited from UpdateSqlGenerator)
AppendWhereAffectedClause(StringBuilder, IReadOnlyList<ColumnModification>)

Appends a WHERE clause involving rows affected.

(Inherited from UpdateSqlGenerator)
AppendWhereAffectedClause(StringBuilder, IReadOnlyList<IColumnModification>)

Appends a WHERE clause involving rows affected.

AppendWhereClause(StringBuilder, IReadOnlyList<ColumnModification>)

Appends a WHERE clause.

(Inherited from UpdateSqlGenerator)
AppendWhereClause(StringBuilder, IReadOnlyList<IColumnModification>)

Appends a WHERE clause.

(Inherited from UpdateSqlGenerator)
AppendWhereCondition(StringBuilder, ColumnModification, Boolean)

Appends a WHERE condition for the given column.

(Inherited from UpdateSqlGenerator)
AppendWhereCondition(StringBuilder, IColumnModification, Boolean)

Appends a WHERE condition for the given column.

(Inherited from UpdateSqlGenerator)
GenerateNextSequenceValueOperation(String, String)

Generates SQL that will obtain the next value in the given sequence.

(Inherited from UpdateSqlGenerator)
GenerateObtainNextSequenceValueOperation(String, String)

Generates SQL that will obtain the next value in the given sequence.

(Inherited from UpdateSqlGenerator)
IsIdentityOperation(IColumnModification)

Returns a value indicating whether the given modification represents an auto-incrementing column.

PrependEnsureAutocommit(StringBuilder)

Prepends a SQL command for turning on autocommit mode in the database, in case it is off.

(Inherited from UpdateSqlGenerator)

Applies to