AffectedCountModificationCommandBatch Class

Definition

A ReaderModificationCommandBatch for providers which return values to find out how many rows were affected.

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

public abstract class AffectedCountModificationCommandBatch : Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch
type AffectedCountModificationCommandBatch = class
    inherit ReaderModificationCommandBatch
Public MustInherit Class AffectedCountModificationCommandBatch
Inherits ReaderModificationCommandBatch
Inheritance
AffectedCountModificationCommandBatch
Derived

Remarks

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

Constructors

AffectedCountModificationCommandBatch(IRelationalCommandBuilderFactory, ISqlGenerationHelper, IUpdateSqlGenerator, IRelationalValueBufferFactoryFactory)

Creates a new AffectedCountModificationCommandBatch instance.

AffectedCountModificationCommandBatch(ModificationCommandBatchFactoryDependencies, Nullable<Int32>)

Creates a new AffectedCountModificationCommandBatch instance.

AffectedCountModificationCommandBatch(ModificationCommandBatchFactoryDependencies)

Creates a new AffectedCountModificationCommandBatch instance.

Properties

AreMoreBatchesExpected

Indicates whether more batches are expected after this one.

(Inherited from ReaderModificationCommandBatch)
CachedCommandText

Gets or sets the cached command text for the commands in the batch.

(Inherited from ReaderModificationCommandBatch)
CommandResultSet

The ResultSetMappings for each command in ModificationCommands.

(Inherited from ReaderModificationCommandBatch)
Dependencies

Relational provider-specific dependencies for this service.

(Inherited from ReaderModificationCommandBatch)
IsCommandTextEmpty

Whether any SQL has already been added to the batch command text.

(Inherited from ReaderModificationCommandBatch)
LastCachedCommandIndex

The ordinal of the last command for which command text was built.

(Inherited from ReaderModificationCommandBatch)
MaxBatchSize

The maximum number of ModificationCommand instances that can be added to a single batch.

(Inherited from ReaderModificationCommandBatch)
ModificationCommands

The list of conceptual insert/update/delete ModificationCommandss in the batch.

(Inherited from ReaderModificationCommandBatch)
ParameterValues

Gets the parameter values for the commands in the batch.

(Inherited from ReaderModificationCommandBatch)
RelationalCommandBuilder

Gets the relational command builder for the commands in the batch.

(Inherited from ReaderModificationCommandBatch)
RequiresTransaction

Indicates whether the batch requires a transaction in order to execute correctly.

(Inherited from ReaderModificationCommandBatch)
ResultSetMappings

The ResultSetMappings for each command in ModificationCommands.

(Inherited from ReaderModificationCommandBatch)
SqlBuilder

Gets the command text builder for the commands in the batch.

(Inherited from ReaderModificationCommandBatch)
SqlGenerationHelper

A helper for SQL generation.

(Inherited from ReaderModificationCommandBatch)
StoreCommand

The store command generated from this batch when Complete(Boolean) is called.

(Inherited from ReaderModificationCommandBatch)
UpdateSqlGenerator

The update SQL generator.

(Inherited from ReaderModificationCommandBatch)

Methods

AddCommand(IReadOnlyModificationCommand)

Adds Updates the command text for the command at the given position in the ModificationCommands list.

(Inherited from ReaderModificationCommandBatch)
AddCommand(ModificationCommand)

Adds the given insert/update/delete ModificationCommands to the batch.

(Inherited from ReaderModificationCommandBatch)
AddParameter(IColumnModification)

Adds a parameter for the given columnModification to the relational command being built for this batch.

(Inherited from ReaderModificationCommandBatch)
AddParameters(IReadOnlyModificationCommand)

Adds parameters for all column modifications in the given modificationCommand to the relational command being built for this batch.

(Inherited from ReaderModificationCommandBatch)
CanAddCommand(IReadOnlyModificationCommand)

Checks whether a new command can be added to the batch.

(Inherited from ReaderModificationCommandBatch)
CanAddCommand(ModificationCommand)

Checks whether or not a new command can be added to the batch.

(Inherited from ReaderModificationCommandBatch)
Complete(Boolean)

Indicates that no more commands will be added to this batch, and prepares it for execution.

(Inherited from ReaderModificationCommandBatch)
Consume(DbDataReader)
Consume(DbDataReader) (Inherited from ReaderModificationCommandBatch)
Consume(RelationalDataReader)

Consumes the data reader created by Execute(IRelationalConnection).

Consume(RelationalDataReader)

Consumes the data reader created by Execute(IRelationalConnection).

(Inherited from ReaderModificationCommandBatch)
ConsumeAsync(DbDataReader, CancellationToken)
ConsumeAsync(DbDataReader, CancellationToken) (Inherited from ReaderModificationCommandBatch)
ConsumeAsync(RelationalDataReader, CancellationToken)

Consumes the data reader created by ExecuteAsync(IRelationalConnection, CancellationToken).

ConsumeAsync(RelationalDataReader, CancellationToken)

Consumes the data reader created by ExecuteAsync(IRelationalConnection, CancellationToken).

(Inherited from ReaderModificationCommandBatch)
ConsumeResultSet(Int32, RelationalDataReader)

Consumes the data reader created by Execute(IRelationalConnection), propagating values back into the ModificationCommand.

ConsumeResultSetAsync(Int32, RelationalDataReader, CancellationToken)

Consumes the data reader created by ExecuteAsync(IRelationalConnection, CancellationToken), propagating values back into the ModificationCommand.

ConsumeResultSetWithoutPropagation(Int32, DbDataReader)
ConsumeResultSetWithoutPropagation(Int32, RelationalDataReader)

Consumes the data reader created by Execute(IRelationalConnection) without propagating values back into the ModificationCommand.

ConsumeResultSetWithoutPropagationAsync(Int32, DbDataReader, CancellationToken)
ConsumeResultSetWithoutPropagationAsync(Int32, RelationalDataReader, CancellationToken)

Consumes the data reader created by ExecuteAsync(IRelationalConnection, CancellationToken) without propagating values back into the ModificationCommand.

ConsumeResultSetWithPropagation(Int32, DbDataReader)
ConsumeResultSetWithPropagation(Int32, RelationalDataReader)

Consumes the data reader created by Execute(IRelationalConnection), propagating values back into the ModificationCommand.

ConsumeResultSetWithPropagationAsync(Int32, DbDataReader, CancellationToken)
ConsumeResultSetWithPropagationAsync(Int32, RelationalDataReader, CancellationToken)

Consumes the data reader created by ExecuteAsync(IRelationalConnection, CancellationToken), propagating values back into the ModificationCommand.

ConsumeResultSetWithRowsAffectedOnly(Int32, RelationalDataReader)

Consumes the data reader created by Execute(IRelationalConnection) without propagating values back into the ModificationCommand.

ConsumeResultSetWithRowsAffectedOnlyAsync(Int32, RelationalDataReader, CancellationToken)

Consumes the data reader created by ExecuteAsync(IRelationalConnection, CancellationToken) without propagating values back into the ModificationCommand.

CreateStoreCommand()

Generates a RawSqlCommand for the batch.

(Inherited from ReaderModificationCommandBatch)
CreateValueBufferFactory(IReadOnlyList<ColumnModification>)

Creates the IRelationalValueBufferFactory that will be used for creating a ValueBuffer to consume the data reader.

(Inherited from ReaderModificationCommandBatch)
CreateValueBufferFactory(IReadOnlyList<IColumnModification>)

Creates the IRelationalValueBufferFactory that will be used for creating a ValueBuffer to consume the data reader.

(Inherited from ReaderModificationCommandBatch)
Execute(IRelationalConnection)

Executes the command generated by this batch against a database using the given connection.

(Inherited from ReaderModificationCommandBatch)
ExecuteAsync(IRelationalConnection, CancellationToken)

Executes the command generated by this batch against a database using the given connection.

(Inherited from ReaderModificationCommandBatch)
GetCommandText()

Gets the command text for all the commands in the current batch and also caches it on CachedCommandText.

(Inherited from ReaderModificationCommandBatch)
GetParameterCount()

Gets the total number of parameters needed for the batch.

(Inherited from ReaderModificationCommandBatch)
IsCommandTextValid()

Checks whether the command text is valid.

(Inherited from ReaderModificationCommandBatch)
IsValid()

Checks whether the command text is valid.

(Inherited from ReaderModificationCommandBatch)
ResetCommandText()

Resets the builder to start building a new batch.

(Inherited from ReaderModificationCommandBatch)
RollbackLastCommand(IReadOnlyModificationCommand)

Rolls back the last command added. Used when adding a command caused the batch to become invalid (e.g. CommandText too long).

(Inherited from ReaderModificationCommandBatch)
SetRequiresTransaction(Boolean)

Sets whether the batch requires a transaction in order to execute correctly.

(Inherited from ReaderModificationCommandBatch)
ThrowAggregateUpdateConcurrencyException(Int32, Int32, Int32)

Throws an exception indicating the command affected an unexpected number of rows.

ThrowAggregateUpdateConcurrencyException(RelationalDataReader, Int32, Int32, Int32)

Throws an exception indicating the command affected an unexpected number of rows.

ThrowAggregateUpdateConcurrencyExceptionAsync(RelationalDataReader, Int32, Int32, Int32, CancellationToken)

Throws an exception indicating the command affected an unexpected number of rows.

TryAddCommand(IReadOnlyModificationCommand)

Attempts to adds the given insert/update/delete modificationCommand to the batch.

(Inherited from ReaderModificationCommandBatch)
UpdateCachedCommandText(Int32)

Updates the command text for the command at the given position in the ModificationCommands list.

(Inherited from ReaderModificationCommandBatch)

Applies to