UpdateSqlGenerator Class

Definition

A base class for the IUpdateSqlGenerator service that is typically inherited from by database providers. The implementation uses a SQL RETURNING clause 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 UpdateSqlGenerator : Microsoft.EntityFrameworkCore.Update.IUpdateSqlGenerator
type UpdateSqlGenerator = class
    interface IUpdateSqlGenerator
type UpdateSqlGenerator = class
    interface IUpdateSqlGenerator
    interface ISingletonUpdateSqlGenerator
Public MustInherit Class UpdateSqlGenerator
Implements IUpdateSqlGenerator
Inheritance
UpdateSqlGenerator
Derived
Implements
IUpdateSqlGenerator Microsoft.EntityFrameworkCore.Update.Internal.ISingletonUpdateSqlGenerator

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

UpdateSqlGenerator(ISqlGenerationHelper)
UpdateSqlGenerator(UpdateSqlGeneratorDependencies)

Initializes a new instance of this class.

Properties

Dependencies

Relational provider-specific dependencies for this service.

SqlGenerationHelper

Helpers for generating update SQL.

Methods

AppendBatchHeader(StringBuilder)

Appends SQL text that defines the start of a batch.

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

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

AppendDeleteCommand(StringBuilder, String, String, IReadOnlyList<IColumnModification>, IReadOnlyList<IColumnModification>, Boolean)

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

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

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

AppendDeleteCommandHeader(StringBuilder, String, String)

Appends a SQL fragment for starting a DELETE.

AppendDeleteOperation(StringBuilder, IReadOnlyModificationCommand, Int32, Boolean)

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

AppendDeleteOperation(StringBuilder, IReadOnlyModificationCommand, Int32)

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

AppendDeleteOperation(StringBuilder, ModificationCommand, Int32)

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

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.

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.

AppendIdentityWhereCondition(StringBuilder, IColumnModification)

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

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

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

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

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

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

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

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

Appends a SQL fragment for starting an INSERT.

AppendInsertCommandHeader(StringBuilder, String, String, IReadOnlyList<IColumnModification>)

Appends a SQL fragment for starting an INSERT.

AppendInsertOperation(StringBuilder, IReadOnlyModificationCommand, Int32, Boolean)

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

AppendInsertOperation(StringBuilder, IReadOnlyModificationCommand, Int32)

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

AppendInsertOperation(StringBuilder, ModificationCommand, Int32)

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

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.

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.

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.

AppendReturningClause(StringBuilder, IReadOnlyList<IColumnModification>, String)

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

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.

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.

AppendSelectCommandHeader(StringBuilder, IReadOnlyList<IColumnModification>)

Appends a SQL fragment for starting a SELECT.

AppendSqlLiteral(StringBuilder, IColumnModification, String, String)

Appends the literal value for modification to the command being built by commandStringBuilder.

AppendStoredProcedureCall(StringBuilder, IReadOnlyModificationCommand, Int32, Boolean)

Appends SQL for calling a stored procedure.

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

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

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

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

AppendUpdateCommand(StringBuilder, String, String, IReadOnlyList<IColumnModification>, IReadOnlyList<IColumnModification>, IReadOnlyList<IColumnModification>, Boolean)

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

AppendUpdateCommand(StringBuilder, String, String, IReadOnlyList<IColumnModification>, IReadOnlyList<IColumnModification>)

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

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

Appends a SQL fragment for starting an UPDATE.

AppendUpdateCommandHeader(StringBuilder, String, String, IReadOnlyList<IColumnModification>)

Appends a SQL fragment for starting an UPDATE.

AppendUpdateOperation(StringBuilder, IReadOnlyModificationCommand, Int32, Boolean)

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

AppendUpdateOperation(StringBuilder, IReadOnlyModificationCommand, Int32)

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

AppendUpdateOperation(StringBuilder, ModificationCommand, Int32)

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

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.

AppendValues(StringBuilder, IReadOnlyList<ColumnModification>)

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

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

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

AppendValues(StringBuilder, String, String, IReadOnlyList<IColumnModification>)

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

AppendValuesHeader(StringBuilder, IReadOnlyList<ColumnModification>)

Appends a SQL fragment for a VALUES.

AppendValuesHeader(StringBuilder, IReadOnlyList<IColumnModification>)

Appends a SQL fragment for a VALUES.

AppendWhereAffectedClause(StringBuilder, IReadOnlyList<ColumnModification>)

Appends a WHERE clause involving rows affected.

AppendWhereAffectedClause(StringBuilder, IReadOnlyList<IColumnModification>)

Appends a WHERE clause involving rows affected.

AppendWhereClause(StringBuilder, IReadOnlyList<ColumnModification>)

Appends a WHERE clause.

AppendWhereClause(StringBuilder, IReadOnlyList<IColumnModification>)

Appends a WHERE clause.

AppendWhereCondition(StringBuilder, ColumnModification, Boolean)

Appends a WHERE condition for the given column.

AppendWhereCondition(StringBuilder, IColumnModification, Boolean)

Appends a WHERE condition for the given column.

GenerateNextSequenceValueOperation(String, String)

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

GenerateObtainNextSequenceValueOperation(String, String)

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

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.

Applies to