語言

ReaderModificationCommandBatch 類別

定義

一個用於 ModificationCommandBatch 使用資料讀取器的實作的基底類別。

此類型通常由資料庫提供者使用;通常不在應用程式碼中使用。

public abstract class ReaderModificationCommandBatch : Microsoft.EntityFrameworkCore.Update.ModificationCommandBatch
[System.Runtime.CompilerServices.Nullable(0)]
public abstract class ReaderModificationCommandBatch : Microsoft.EntityFrameworkCore.Update.ModificationCommandBatch
type ReaderModificationCommandBatch = class
    inherit ModificationCommandBatch
[<System.Runtime.CompilerServices.Nullable(0)>]
type ReaderModificationCommandBatch = class
    inherit ModificationCommandBatch
Public MustInherit Class ReaderModificationCommandBatch
Inherits ModificationCommandBatch
繼承
ReaderModificationCommandBatch
衍生
屬性

備註

更多資訊與範例請參見 資料庫提供者與擴充功能的實作 。

建構函式

名稱 Description
ReaderModificationCommandBatch(IRelationalCommandBuilderFactory, ISqlGenerationHelper, IUpdateSqlGenerator, IRelationalValueBufferFactoryFactory)

建立新的 ReaderModificationCommandBatch 實例。

ReaderModificationCommandBatch(ModificationCommandBatchFactoryDependencies, Nullable<Int32>)

建立新的 ReaderModificationCommandBatch 實例。

ReaderModificationCommandBatch(ModificationCommandBatchFactoryDependencies)

建立新的 ReaderModificationCommandBatch 實例。

屬性

名稱 Description
AreMoreBatchesExpected

表示這批次之後是否還會有更多。

CachedCommandText

取得或設定批次中指令的快取指令文字。

CommandResultSet

每個指令的 ModificationCommandss 在 中。ResultSetMapping

Dependencies

此服務的關聯提供者專屬相依關係。

IsCommandTextEmpty

批次指令文本中是否已經加入任何 SQL。

LastCachedCommandIndex

為最後一個指令所撰寫的指令的序數。

MaxBatchSize

單一 ModificationCommand 批次中最多可加入的實例數。

ModificationCommands

批次中概念性插入/更新/刪除 ModificationCommands的清單。

ParameterValues

取得批次指令的參數值。

RelationalCommandBuilder

取得批次指令的關聯式指令建構器。

RequiresTransaction

表示批次是否需要交易才能正確執行。

ResultSetMappings

每個指令的 ModificationCommandss 在 中。ResultSetMapping

SqlBuilder

取得批次指令的指令文字建構器。

SqlGenerationHelper

一個協助 SQL 產生的工具。

StoreCommand

當呼叫時,從此批次 Complete(Boolean) 產生的 store 指令。

UpdateSqlGenerator

更新 SQL 產生器。

方法

名稱 Description
AddCommand(IReadOnlyModificationCommand)

新增 更新該指令在列表中指定位置 ModificationCommands 的指令文字。

AddCommand(ModificationCommand)

將插入/更新/刪除 ModificationCommands 的輸入資料加入批次。

AddParameter(IColumnModification)

為該批次建立的關聯指令新增一個參數 columnModification 。

AddParameters(IReadOnlyModificationCommand)

為該批次所建 modificationCommand 置的關聯指令新增所有欄位修改的參數。

CanAddCommand(IReadOnlyModificationCommand)

檢查是否可以新增指令到批次中。

CanAddCommand(ModificationCommand)

檢查是否可以新增指令到批次中。

Complete(Boolean)

表示此批次不會新增更多指令,並準備執行。

Consume(DbDataReader)

一個用於 ModificationCommandBatch 使用資料讀取器的實作的基底類別。

此類型通常由資料庫提供者使用;通常不在應用程式碼中使用。

Consume(RelationalDataReader)

消耗由 所 Execute(IRelationalConnection)建立的資料讀取器。

ConsumeAsync(DbDataReader, CancellationToken)

一個用於 ModificationCommandBatch 使用資料讀取器的實作的基底類別。

此類型通常由資料庫提供者使用;通常不在應用程式碼中使用。

ConsumeAsync(RelationalDataReader, CancellationToken)

消耗由 所 ExecuteAsync(IRelationalConnection, CancellationToken)建立的資料讀取器。

CreateStoreCommand()

為該批次產生 a RawSqlCommand 。

CreateValueBufferFactory(IReadOnlyList<ColumnModification>)

建立 IRelationalValueBufferFactory 該 將用於建立 ValueBuffer 以消耗資料讀取器。

CreateValueBufferFactory(IReadOnlyList<IColumnModification>)

建立 IRelationalValueBufferFactory 該 將用於建立 ValueBuffer 以消耗資料讀取器。

Execute(IRelationalConnection)

執行此批次產生的指令,對使用指定連線的資料庫執行。

ExecuteAsync(IRelationalConnection, CancellationToken)

執行此批次產生的指令,對使用指定連線的資料庫執行。

GetCommandText()

取得目前批次中所有指令的指令文字,並且快取到 CachedCommandText。

GetParameterCount()

取得該批次所需的參數總數。

IsCommandTextValid()

檢查指令文字是否有效。

IsValid()

檢查指令文字是否有效。

ResetCommandText()

重置建構器開始新一批。

RollbackLastCommand(IReadOnlyModificationCommand)

回滾上一次新增的指令。 當新增指令時使用,會導致批次無效(例如 CommandText 太長)。

SetRequiresTransaction(Boolean)

設定批次是否需要交易才能正確執行。

TryAddCommand(IReadOnlyModificationCommand)

嘗試將給定的插入/更新/刪除 modificationCommand 加入批次。

UpdateCachedCommandText(Int32)

更新該指令在列表中指定位置 ModificationCommands 的指令文字。

適用於