語言

SqliteMigrationsSqlGenerator 類別

定義

SQLite 專屬的實作。MigrationsSqlGenerator

public class SqliteMigrationsSqlGenerator : Microsoft.EntityFrameworkCore.Migrations.MigrationsSqlGenerator
[System.Runtime.CompilerServices.Nullable(0)]
public class SqliteMigrationsSqlGenerator : Microsoft.EntityFrameworkCore.Migrations.MigrationsSqlGenerator
type SqliteMigrationsSqlGenerator = class
    inherit MigrationsSqlGenerator
[<System.Runtime.CompilerServices.Nullable(0)>]
type SqliteMigrationsSqlGenerator = class
    inherit MigrationsSqlGenerator
Public Class SqliteMigrationsSqlGenerator
Inherits MigrationsSqlGenerator
繼承
SqliteMigrationsSqlGenerator
屬性

備註

服役期間為 Scoped。 這表示每個 DbContext 實例都會使用自己的服務實例。 實作方式可能取決於其他註冊於任何生命週期的服務。 實作不需要執行緒安全。

更多資訊與範例請參見 資料庫遷移及 使用 EF Core 存取 SQLite 資料庫 。

建構函式

名稱 Description
SqliteMigrationsSqlGenerator(IRelationalCommandBuilderFactory, ISqlGenerationHelper, IRelationalTypeMapper, IRelationalAnnotationProvider)

SQLite 專屬的實作。MigrationsSqlGenerator

SqliteMigrationsSqlGenerator(MigrationsSqlGeneratorDependencies, IMigrationsAnnotationProvider)

建立新的 SqliteMigrationsSqlGenerator 實例。

SqliteMigrationsSqlGenerator(MigrationsSqlGeneratorDependencies, IRelationalAnnotationProvider)

建立新的 SqliteMigrationsSqlGenerator 實例。

SqliteMigrationsSqlGenerator(MigrationsSqlGeneratorDependencies)

SQLite 專屬的實作。MigrationsSqlGenerator

屬性

名稱 Description
Annotations

SQLite 專屬的實作。MigrationsSqlGenerator

(繼承來源 MigrationsSqlGenerator)
Dependencies

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

(繼承來源 MigrationsSqlGenerator)
Options

產生指令時會取得或設定可用的選項。

(繼承來源 MigrationsSqlGenerator)
SqlGenerationHelper

SQLite 專屬的實作。MigrationsSqlGenerator

(繼承來源 MigrationsSqlGenerator)
SqlGenerator

IUpdateSqlGenerator。

(繼承來源 MigrationsSqlGenerator)
TypeMapper

SQLite 專屬的實作。MigrationsSqlGenerator

(繼承來源 MigrationsSqlGenerator)
VersionComparer

會有一個比較器,可以用來比較兩個產品版本。

(繼承來源 MigrationsSqlGenerator)

方法

名稱 Description
CheckConstraint(AddCheckConstraintOperation, IModel, MigrationCommandListBuilder)

產生一個 SQL 片段,以執行檢查約束 AddCheckConstraintOperation。

(繼承來源 MigrationsSqlGenerator)
CheckConstraint(CreateCheckConstraintOperation, IModel, MigrationCommandListBuilder)

產生一個 SQL 片段,以執行檢查約束 CreateCheckConstraintOperation。

(繼承來源 MigrationsSqlGenerator)
ColumnDefinition(AddColumnOperation, IModel, MigrationCommandListBuilder)

產生一個 SQL 片段,用於欄位定義。AddColumnOperation

ColumnDefinition(AddColumnOperation, IModel, MigrationCommandListBuilder)

產生一個 SQL 片段,用於欄位定義。AddColumnOperation

(繼承來源 MigrationsSqlGenerator)
ColumnDefinition(String, String, String, ColumnOperation, IModel, MigrationCommandListBuilder)

為給定欄位元資料產生 SQL 片段,以定義欄位。

ColumnDefinition(String, String, String, Type, String, Nullable<Boolean>, Nullable<Int32>, Boolean, Boolean, Object, String, String, IAnnotatable, IModel, MigrationCommandListBuilder)

為給定欄位元資料產生 SQL 片段,以定義欄位。

ColumnDefinition(String, String, String, Type, String, Nullable<Boolean>, Nullable<Int32>, Boolean, Boolean, Object, String, String, IAnnotatable, IModel, MigrationCommandListBuilder)

為給定欄位元資料產生 SQL 片段,以定義欄位。

(繼承來源 MigrationsSqlGenerator)
ColumnDefinition(String, String, String, Type, String, Nullable<Boolean>, Nullable<Int32>, Nullable<Boolean>, Boolean, Boolean, Object, String, String, IAnnotatable, IModel, MigrationCommandListBuilder)

為給定欄位元資料產生 SQL 片段,以定義欄位。

ColumnList(String[])

將給定的欄位名稱串接成 DelimitIdentifier(String) 一個分離的清單。

(繼承來源 MigrationsSqlGenerator)
ComputedColumnDefinition(String, String, String, ColumnOperation, IModel, MigrationCommandListBuilder)

產生一個 SQL 片段,用於計算出給定欄位中繼資料的欄位定義。

CreateTableCheckConstraints(CreateTableOperation, IModel, MigrationCommandListBuilder)

產生一個 SQL 片段,以滿足 的檢查約束 CreateTableOperation。

(繼承來源 MigrationsSqlGenerator)
CreateTableColumns(CreateTableOperation, IModel, MigrationCommandListBuilder)

產生一個 SQL 片段,用於欄位定義。CreateTableOperation

CreateTableConstraints(CreateTableOperation, IModel, MigrationCommandListBuilder)

產生一個 SQL 片段,滿足 . 的限制 CreateTableOperation條件。

(繼承來源 MigrationsSqlGenerator)
CreateTableForeignKeys(CreateTableOperation, IModel, MigrationCommandListBuilder)

產生一個 SQL 片段,以滿足 . 的外鍵約束 CreateTableOperation。

(繼承來源 MigrationsSqlGenerator)
CreateTablePrimaryKeyConstraint(CreateTableOperation, IModel, MigrationCommandListBuilder)

產生一個 SQL 片段,以滿足 。CreateTableOperation

(繼承來源 MigrationsSqlGenerator)
CreateTableUniqueConstraints(CreateTableOperation, IModel, MigrationCommandListBuilder)

產生一個 SQL 片段,以滿足 。CreateTableOperation

(繼承來源 MigrationsSqlGenerator)
DefaultValue(Object, String, MigrationCommandListBuilder)

產生一個 SQL 片段,作為欄位的預設約束條件。

(繼承來源 MigrationsSqlGenerator)
DefaultValue(Object, String, String, MigrationCommandListBuilder)

產生一個 SQL 片段,作為欄位的預設約束條件。

(繼承來源 MigrationsSqlGenerator)
EndStatement(MigrationCommandListBuilder, Boolean)

產生一個 SQL 片段以終止 SQL 指令。

(繼承來源 MigrationsSqlGenerator)
FindEntityTypes(IModel, String, String)
已淘汰.

找出所有 IEntityType映射到該表格的 s。

(繼承來源 MigrationsSqlGenerator)
FindProperty(IModel, String, String, String)
已淘汰.

找到一些 IProperty 映射到指定欄位的

若多個屬性映射到同一欄,則回傳的屬性為任意選擇的。 模型驗證器確保所有映射到指定欄位的屬性配置一致。

(繼承來源 MigrationsSqlGenerator)
ForeignKeyAction(ReferentialAction, MigrationCommandListBuilder)

為給定的參照動作產生一個 SQL 片段。

(繼承來源 MigrationsSqlGenerator)
ForeignKeyConstraint(AddForeignKeyOperation, IModel, MigrationCommandListBuilder)

為 的外鍵約束 AddForeignKeyOperation產生 SQL 片段。

(繼承來源 MigrationsSqlGenerator)
Generate(AddCheckConstraintOperation, IModel, MigrationCommandListBuilder)

由於 NotSupportedException 此操作需要資料表重建,而這些資料表尚未支援。

Generate(AddColumnOperation, IModel, MigrationCommandListBuilder, Boolean)

透過對給定AddColumnOperationMigrationCommandListBuilder的 進行呼叫來建立指令。

Generate(AddColumnOperation, IModel, MigrationCommandListBuilder, Boolean)

透過對給定AddColumnOperationMigrationCommandListBuilder的 進行呼叫來建立指令。

(繼承來源 MigrationsSqlGenerator)
Generate(AddColumnOperation, IModel, MigrationCommandListBuilder)

透過對給定AddColumnOperationMigrationCommandListBuilder指令進行呼叫來建立指令,然後終止最後一個指令。

(繼承來源 MigrationsSqlGenerator)
Generate(AddForeignKeyOperation, IModel, MigrationCommandListBuilder, Boolean)

由於 NotSupportedException 此操作需要資料表重建,而這些資料表尚未支援。

Generate(AddForeignKeyOperation, IModel, MigrationCommandListBuilder, Boolean)

透過對給定AddForeignKeyOperationMigrationCommandListBuilder的 進行呼叫來建立指令。

(繼承來源 MigrationsSqlGenerator)
Generate(AddForeignKeyOperation, IModel, MigrationCommandListBuilder)

由於 NotSupportedException 此操作需要資料表重建,而這些資料表尚未支援。

Generate(AddPrimaryKeyOperation, IModel, MigrationCommandListBuilder, Boolean)

由於 NotSupportedException 此操作需要資料表重建,而這些資料表尚未支援。

Generate(AddPrimaryKeyOperation, IModel, MigrationCommandListBuilder, Boolean)

透過對給定AddPrimaryKeyOperationMigrationCommandListBuilder的 進行呼叫來建立指令。

(繼承來源 MigrationsSqlGenerator)
Generate(AddPrimaryKeyOperation, IModel, MigrationCommandListBuilder)

由於 NotSupportedException 此操作需要資料表重建,而這些資料表尚未支援。

Generate(AddUniqueConstraintOperation, IModel, MigrationCommandListBuilder)

由於 NotSupportedException 此操作需要資料表重建,而這些資料表尚未支援。

Generate(AlterColumnOperation, IModel, MigrationCommandListBuilder)

由於 NotSupportedException 此操作需要資料表重建,而這些資料表尚未支援。

Generate(AlterDatabaseOperation, IModel, MigrationCommandListBuilder)

透過對給定AlterDatabaseOperationMigrationCommandListBuilder的 進行呼叫來建立指令。

Generate(AlterDatabaseOperation, IModel, MigrationCommandListBuilder)

資料庫提供者可覆寫,透過對給定MigrationCommandListBuilder的 呼叫來建立指令。AlterDatabaseOperation

(繼承來源 MigrationsSqlGenerator)
Generate(AlterSequenceOperation, IModel, MigrationCommandListBuilder)

因為 SQLite 不支援序列,所以 throws NotSupportedException 。

Generate(AlterTableOperation, IModel, MigrationCommandListBuilder)

資料庫提供者可覆寫,透過對給定MigrationCommandListBuilder的 呼叫來建立指令。AlterTableOperation

(繼承來源 MigrationsSqlGenerator)
Generate(CreateCheckConstraintOperation, IModel, MigrationCommandListBuilder)

由於 NotSupportedException 此操作需要資料表重建,而這些資料表尚未支援。

Generate(CreateIndexOperation, IModel, MigrationCommandListBuilder, Boolean)

透過對給定CreateIndexOperationMigrationCommandListBuilder的 進行呼叫來建立指令。

(繼承來源 MigrationsSqlGenerator)
Generate(CreateIndexOperation, IModel, MigrationCommandListBuilder)

透過對給定CreateIndexOperationMigrationCommandListBuilder指令進行呼叫來建立指令,然後終止最後一個指令。

(繼承來源 MigrationsSqlGenerator)
Generate(CreateSequenceOperation, IModel, MigrationCommandListBuilder)

因為 SQLite 不支援序列,所以 throws NotSupportedException 。

Generate(CreateTableOperation, IModel, MigrationCommandListBuilder, Boolean)

透過對給定CreateTableOperationMigrationCommandListBuilder的 進行呼叫來建立指令。

Generate(CreateTableOperation, IModel, MigrationCommandListBuilder, Boolean)

透過對給定CreateTableOperationMigrationCommandListBuilder的 進行呼叫來建立指令。

(繼承來源 MigrationsSqlGenerator)
Generate(CreateTableOperation, IModel, MigrationCommandListBuilder)

透過對給定CreateTableOperationMigrationCommandListBuilder的 進行呼叫來建立指令。

Generate(DeleteDataOperation, IModel, MigrationCommandListBuilder)

透過對給定DeleteDataOperationMigrationCommandListBuilder指令進行呼叫來建立指令,然後終止最後一個指令。

(繼承來源 MigrationsSqlGenerator)
Generate(DropCheckConstraintOperation, IModel, MigrationCommandListBuilder)

由於 NotSupportedException 此操作需要資料表重建,而這些資料表尚未支援。

Generate(DropColumnOperation, IModel, MigrationCommandListBuilder, Boolean)

由於 NotSupportedException 此操作需要資料表重建,而這些資料表尚未支援。

Generate(DropColumnOperation, IModel, MigrationCommandListBuilder, Boolean)

透過對給定DropColumnOperationMigrationCommandListBuilder的 進行呼叫來建立指令。

(繼承來源 MigrationsSqlGenerator)
Generate(DropColumnOperation, IModel, MigrationCommandListBuilder)

由於 NotSupportedException 此操作需要資料表重建,而這些資料表尚未支援。

Generate(DropForeignKeyOperation, IModel, MigrationCommandListBuilder, Boolean)

由於 NotSupportedException 此操作需要資料表重建,而這些資料表尚未支援。

Generate(DropForeignKeyOperation, IModel, MigrationCommandListBuilder, Boolean)

透過對給定DropForeignKeyOperationMigrationCommandListBuilder的 進行呼叫來建立指令。

(繼承來源 MigrationsSqlGenerator)
Generate(DropForeignKeyOperation, IModel, MigrationCommandListBuilder)

由於 NotSupportedException 此操作需要資料表重建,而這些資料表尚未支援。

Generate(DropIndexOperation, IModel, MigrationCommandListBuilder, Boolean)

透過對給定DropIndexOperationMigrationCommandListBuilder的 進行呼叫來建立指令。

Generate(DropIndexOperation, IModel, MigrationCommandListBuilder)

透過對給定DropIndexOperationMigrationCommandListBuilder的 進行呼叫來建立指令。

Generate(DropPrimaryKeyOperation, IModel, MigrationCommandListBuilder, Boolean)

由於 NotSupportedException 此操作需要資料表重建,而這些資料表尚未支援。

Generate(DropPrimaryKeyOperation, IModel, MigrationCommandListBuilder, Boolean)

透過對給定DropPrimaryKeyOperationMigrationCommandListBuilder的 進行呼叫來建立指令。

(繼承來源 MigrationsSqlGenerator)
Generate(DropPrimaryKeyOperation, IModel, MigrationCommandListBuilder)

由於 NotSupportedException 此操作需要資料表重建,而這些資料表尚未支援。

Generate(DropSchemaOperation, IModel, MigrationCommandListBuilder)

忽略了,因為 SQLite 不支援結構,且為了提升測試相容性而默默忽略。

Generate(DropSequenceOperation, IModel, MigrationCommandListBuilder)

因為 SQLite 不支援序列,所以 throws NotSupportedException 。

Generate(DropTableOperation, IModel, MigrationCommandListBuilder, Boolean)

透過對給定DropTableOperationMigrationCommandListBuilder的 進行呼叫來建立指令。

(繼承來源 MigrationsSqlGenerator)
Generate(DropTableOperation, IModel, MigrationCommandListBuilder)

透過對給定DropTableOperationMigrationCommandListBuilder指令進行呼叫來建立指令,然後終止最後一個指令。

(繼承來源 MigrationsSqlGenerator)
Generate(DropUniqueConstraintOperation, IModel, MigrationCommandListBuilder)

由於 NotSupportedException 此操作需要資料表重建,而這些資料表尚未支援。

Generate(EnsureSchemaOperation, IModel, MigrationCommandListBuilder)

忽略了,因為 SQLite 不支援結構,且為了提升測試相容性而默默忽略。

Generate(InsertDataOperation, IModel, MigrationCommandListBuilder, Boolean)

透過對給定InsertDataOperationMigrationCommandListBuilder的 進行呼叫來建立指令。

(繼承來源 MigrationsSqlGenerator)
Generate(InsertDataOperation, IModel, MigrationCommandListBuilder)

透過對給定InsertDataOperationMigrationCommandListBuilder指令進行呼叫來建立指令,然後終止最後一個指令。

(繼承來源 MigrationsSqlGenerator)
Generate(IReadOnlyList<MigrationOperation>, IModel, MigrationsSqlGenerationOptions)

從操作清單產生指令。

Generate(IReadOnlyList<MigrationOperation>, IModel)

從操作清單產生指令。

Generate(MigrationOperation, IModel, MigrationCommandListBuilder)

透過對給定MigrationOperationMigrationCommandListBuilder的 進行呼叫來建立指令。

(繼承來源 MigrationsSqlGenerator)
Generate(RenameColumnOperation, IModel, MigrationCommandListBuilder)

透過對給定RenameTableOperationMigrationCommandListBuilder的 進行呼叫來建立指令。

Generate(RenameIndexOperation, IModel, MigrationCommandListBuilder)

透過對給定RenameIndexOperationMigrationCommandListBuilder的 進行呼叫來建立指令。

Generate(RenameSequenceOperation, IModel, MigrationCommandListBuilder)

因為 SQLite 不支援序列,所以 throws NotSupportedException 。

Generate(RenameTableOperation, IModel, MigrationCommandListBuilder)

透過對給定RenameTableOperationMigrationCommandListBuilder的 進行呼叫來建立指令。

Generate(RestartSequenceOperation, IModel, MigrationCommandListBuilder)

因為 SQLite 不支援序列,所以 throws NotSupportedException 。

Generate(SqlOperation, IModel, MigrationCommandListBuilder)

透過對給定SqlOperationMigrationCommandListBuilder指令進行呼叫來建立指令,然後終止最後一個指令。

(繼承來源 MigrationsSqlGenerator)
Generate(UpdateDataOperation, IModel, MigrationCommandListBuilder)

透過對給定UpdateDataOperationMigrationCommandListBuilder指令進行呼叫來建立指令,然後終止最後一個指令。

(繼承來源 MigrationsSqlGenerator)
GenerateIndexColumnList(CreateIndexOperation, IModel, MigrationCommandListBuilder)

從 中回傳索引欄位清單 CreateIndexOperation的 SQL 片段。

GenerateIndexColumnList(CreateIndexOperation, IModel, MigrationCommandListBuilder)

從 中回傳索引欄位清單 CreateIndexOperation的 SQL 片段。

(繼承來源 MigrationsSqlGenerator)
GenerateModificationCommands(DeleteDataOperation, IModel)

產生對應特定操作的指令。

(繼承來源 MigrationsSqlGenerator)
GenerateModificationCommands(InsertDataOperation, IModel)

產生對應特定操作的指令。

(繼承來源 MigrationsSqlGenerator)
GenerateModificationCommands(UpdateDataOperation, IModel)

產生對應特定操作的指令。

(繼承來源 MigrationsSqlGenerator)
GetColumnType(String, String, String, ColumnOperation, IModel)

根據提供的元資料,取得欄位的儲存/資料庫類型。

(繼承來源 MigrationsSqlGenerator)
GetColumnType(String, String, String, Type, Nullable<Boolean>, Nullable<Int32>, Boolean, IModel)

根據提供的元資料,取得欄位的儲存/資料庫類型。

(繼承來源 MigrationsSqlGenerator)
GetColumnType(String, String, String, Type, Nullable<Boolean>, Nullable<Int32>, Nullable<Boolean>, Boolean, IModel)

根據提供的元資料,取得欄位的儲存/資料庫類型。

(繼承來源 MigrationsSqlGenerator)
HasLegacyRenameOperations(IModel)

檢查並RenameTableOperationRenameSequenceOperation使用舊有行為,將新名稱和結構設定為空,且未更改。

(繼承來源 MigrationsSqlGenerator)
IndexOptions(CreateIndexOperation, IModel, MigrationCommandListBuilder)

從 . 產生一個 SQL 片段,用於索引的額外功能(篩選、包含欄位、選項)。CreateIndexOperation

(繼承來源 MigrationsSqlGenerator)
IndexOptions(MigrationOperation, IModel, MigrationCommandListBuilder)

從 . 產生一個 SQL 片段,用於索引的額外功能(篩選、包含欄位、選項)。CreateIndexOperation

(繼承來源 MigrationsSqlGenerator)
IndexTraits(MigrationOperation, IModel, MigrationCommandListBuilder)

從 、 AddPrimaryKeyOperation、 或 AddUniqueConstraintOperation產生索引特徵CreateIndexOperation的 SQL 片段。

(繼承來源 MigrationsSqlGenerator)
IsOldColumnSupported(IModel)

檢查舊欄位是否 AddColumnOperation 支援傳遞,該欄位僅在 EF Core 1.1 中加入。

(繼承來源 MigrationsSqlGenerator)
PrimaryKeyConstraint(AddPrimaryKeyOperation, IModel, MigrationCommandListBuilder)

產生一個 SQL 片段,以滿足 的主鍵約束 AddPrimaryKeyOperation。

(繼承來源 MigrationsSqlGenerator)
SequenceOptions(AlterSequenceOperation, IModel, MigrationCommandListBuilder)

產生一個 SQL 片段,並在 AlterSequenceOperation.

(繼承來源 MigrationsSqlGenerator)
SequenceOptions(CreateSequenceOperation, IModel, MigrationCommandListBuilder)

產生一個 SQL 片段,並在 CreateSequenceOperation.

(繼承來源 MigrationsSqlGenerator)
SequenceOptions(String, String, Int32, Nullable<Int64>, Nullable<Int64>, Boolean, IModel, MigrationCommandListBuilder)

產生一個 SQL 片段,並配置包含指定選項的序列。

(繼承來源 MigrationsSqlGenerator)
SequenceOptions(String, String, SequenceOperation, IModel, MigrationCommandListBuilder, Boolean)

產生一個 SQL 片段,並配置包含指定選項的序列。

(繼承來源 MigrationsSqlGenerator)
SequenceOptions(String, String, SequenceOperation, IModel, MigrationCommandListBuilder)

產生一個 SQL 片段,並配置包含指定選項的序列。

(繼承來源 MigrationsSqlGenerator)
TryGetVersion(IModel, String)

取得用來產生當前遷移的產品版本。 提供者可利用此機制維持與先前版本產生的遷移相容性。

(繼承來源 MigrationsSqlGenerator)
UniqueConstraint(AddUniqueConstraintOperation, IModel, MigrationCommandListBuilder)

產生一個 SQL 片段,滿足唯一限制的 AddUniqueConstraintOperation。

(繼承來源 MigrationsSqlGenerator)

適用於