SqlCeMigrationSqlGenerator.Generate 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| Generate(RenameColumnOperation) |
產生 SQL 的 RenameColumnOperation。 產生的 SQL 應該使用 Statement 方法來新增。 |
| Generate(RenameIndexOperation) |
產生 SQL 的 RenameIndexOperation。 產生的 SQL 應該使用 Statement 方法來新增。 |
| Generate(RenameProcedureOperation) |
產生指定的重命名程序操作。 |
| Generate(RenameTableOperation) |
產生 SQL 的 RenameTableOperation。 產生的 SQL 應該使用 Statement 方法來新增。 |
| Generate(SqlOperation) |
產生 SQL 的 SqlOperation。 產生的 SQL 應使用 Statement 或 StatementBatch 方法來新增。 |
| Generate(UpdateDatabaseOperation) |
產生指定的更新資料庫操作,代表一套遷移的應用。 生成的腳本是冪元的,意即包含條件邏輯,用來檢查個別遷移是否已經套用,並只套用待處理的遷移。 |
| Generate(DbGeography) |
產生 SQL 來指定欄位上設定常數地理分布的預設值。 這個方法只會產生實際的值,而不是用 SQL 來設定預設值。 |
| Generate(DbGeometry) |
產生 SQL 來指定欄位上設定常數幾何的預設值。 這個方法只會產生實際的值,而不是用 SQL 來設定預設值。 |
| Generate(DateTime) |
產生 SQL 來指定欄位設定的常數 DateTime 預設值。 這個方法只會產生實際的值,而不是用 SQL 來設定預設值。 |
| Generate(DateTimeOffset) |
產生 SQL 以指定欄位設定一個常數的 DateTimeOffset 預設值。 這個方法只會產生實際的值,而不是用 SQL 來設定預設值。 |
| Generate(Guid) |
產生 SQL 來指定欄位設定的常數 Guid 預設值。 這個方法只會產生實際的值,而不是用 SQL 來設定預設值。 |
| Generate(Object) |
產生 SQL 來指定欄位上設定的常數預設值。 這個方法只會產生實際的值,而不是用 SQL 來設定預設值。 |
| Generate(String) |
產生 SQL 來指定欄位預設值為常數字串。 這個方法只會產生實際的值,而不是用 SQL 來設定預設值。 |
| Generate(TimeSpan) |
產生 SQL 來指定欄位設定一個常數的 TimeSpan 預設值。 這個方法只會產生實際的值,而不是用 SQL 來設定預設值。 |
| Generate(IEnumerable<MigrationOperation>, String) |
將一組遷移操作轉換為 Microsoft SQL Server 專用的 SQL。 |
| Generate(ColumnModel, IndentedTextWriter) |
為所指定的欄位模型產生 SQL。 此方法會被其他處理欄位的方法呼叫,並可覆寫以變更產生的 SQL。 |
| Generate(MoveProcedureOperation) |
產生指定的移動程序操作。 |
| Generate(MigrationOperation) |
產生 SQL 的 MigrationOperation。 允許衍生提供者處理更多操作類型。 產生的 SQL 應該使用 Statement 方法來新增。 |
| Generate(MoveTableOperation) |
產生 SQL 的 MoveTableOperation。 產生的 SQL 應該使用 Statement 方法來新增。 |
| Generate(DropTableOperation) |
產生 SQL 的 DropTableOperation。 產生的 SQL 應該使用 Statement 方法來新增。 |
| Generate(Boolean) |
產生 SQL 來指定欄位設定常數布爾預設值。 這個方法只會產生實際的值,而不是用 SQL 來設定預設值。 |
| Generate(Byte[]) |
產生 SQL 來指定欄位設定的常數位元組[] 預設值。 這個方法只會產生實際的值,而不是用 SQL 來設定預設值。 |
| Generate(AddColumnOperation) |
產生 SQL 的 AddColumnOperation。 產生的 SQL 應該使用 Statement 方法來新增。 |
| Generate(AddForeignKeyOperation) |
產生 SQL 的 AddForeignKeyOperation。 產生的 SQL 應該使用 Statement 方法來新增。 |
| Generate(AddPrimaryKeyOperation) |
產生 SQL 的 AddPrimaryKeyOperation。 產生的 SQL 應該使用 Statement 方法來新增。 |
| Generate(HistoryOperation) |
產生 SQL 的 HistoryOperation。 產生的 SQL 應該使用 Statement 方法來新增。 |
| Generate(AlterProcedureOperation) |
產生指定的 alter 程序操作。 |
| Generate(AlterTableOperation) |
當資料表定義或其屬性被更改時,覆寫此方法以產生 SQL。 此方法的預設實作不會執行任何動作。 |
| Generate(AlterColumnOperation) |
產生 SQL 的 AlterColumnOperation。 產生的 SQL 應該使用 Statement 方法來新增。 |
| Generate(CreateProcedureOperation) |
產生指定的建立程序操作。 |
| Generate(CreateTableOperation) |
產生 SQL 的 CreateTableOperation。 產生的 SQL 應該使用 Statement 方法來新增。 |
| Generate(DropColumnOperation) |
產生 SQL 的 DropColumnOperation。 產生的 SQL 應該使用 Statement 方法來新增。 |
| Generate(DropForeignKeyOperation) |
產生 SQL 的 DropForeignKeyOperation。 產生的 SQL 應該使用 Statement 方法來新增。 |
| Generate(DropIndexOperation) |
產生 SQL 的 DropIndexOperation。 產生的 SQL 應該使用 Statement 方法來新增。 |
| Generate(DropPrimaryKeyOperation) |
產生 SQL 的 DropPrimaryKeyOperation。 產生的 SQL 應該使用 Statement 方法來新增。 |
| Generate(DropProcedureOperation) |
產生指定的丟棄程序操作。 |
| Generate(CreateIndexOperation) |
產生 SQL 的 CreateIndexOperation。 產生的 SQL 應該使用 Statement 方法來新增。 |
Generate(RenameColumnOperation)
產生 SQL 的 RenameColumnOperation。 產生的 SQL 應該使用 Statement 方法來新增。
protected virtual void Generate(System.Data.Entity.Migrations.Model.RenameColumnOperation renameColumnOperation);
override this.Generate : System.Data.Entity.Migrations.Model.RenameColumnOperation -> unit
參數
- renameColumnOperation
- RenameColumnOperation
產生 SQL 的操作。
適用於
Generate(RenameIndexOperation)
產生 SQL 的 RenameIndexOperation。 產生的 SQL 應該使用 Statement 方法來新增。
protected virtual void Generate(System.Data.Entity.Migrations.Model.RenameIndexOperation renameIndexOperation);
override this.Generate : System.Data.Entity.Migrations.Model.RenameIndexOperation -> unit
參數
- renameIndexOperation
- RenameIndexOperation
產生 SQL 的操作。
適用於
Generate(RenameProcedureOperation)
產生指定的重命名程序操作。
protected virtual void Generate(System.Data.Entity.Migrations.Model.RenameProcedureOperation renameProcedureOperation);
override this.Generate : System.Data.Entity.Migrations.Model.RenameProcedureOperation -> unit
參數
- renameProcedureOperation
- RenameProcedureOperation
重命名程序操作。
適用於
Generate(RenameTableOperation)
產生 SQL 的 RenameTableOperation。 產生的 SQL 應該使用 Statement 方法來新增。
protected virtual void Generate(System.Data.Entity.Migrations.Model.RenameTableOperation renameTableOperation);
override this.Generate : System.Data.Entity.Migrations.Model.RenameTableOperation -> unit
參數
- renameTableOperation
- RenameTableOperation
產生 SQL 的操作。
適用於
Generate(SqlOperation)
產生 SQL 的 SqlOperation。 產生的 SQL 應使用 Statement 或 StatementBatch 方法來新增。
protected virtual void Generate(System.Data.Entity.Migrations.Model.SqlOperation sqlOperation);
override this.Generate : System.Data.Entity.Migrations.Model.SqlOperation -> unit
參數
- sqlOperation
- SqlOperation
產生 SQL 的操作。
適用於
Generate(UpdateDatabaseOperation)
產生指定的更新資料庫操作,代表一套遷移的應用。 生成的腳本是冪元的,意即包含條件邏輯,用來檢查個別遷移是否已經套用,並只套用待處理的遷移。
protected virtual void Generate(System.Data.Entity.Migrations.Model.UpdateDatabaseOperation updateDatabaseOperation);
override this.Generate : System.Data.Entity.Migrations.Model.UpdateDatabaseOperation -> unit
參數
- updateDatabaseOperation
- UpdateDatabaseOperation
更新資料庫操作。
適用於
Generate(DbGeography)
產生 SQL 來指定欄位上設定常數地理分布的預設值。 這個方法只會產生實際的值,而不是用 SQL 來設定預設值。
protected virtual string Generate(System.Data.Entity.Spatial.DbGeography defaultValue);
override this.Generate : System.Data.Entity.Spatial.DbGeography -> string
Protected Overridable Function Generate (defaultValue As DbGeography) As String
參數
- defaultValue
- DbGeography
要設定的價值。
傳回
SQL 代表預設值。
適用於
Generate(DbGeometry)
產生 SQL 來指定欄位上設定常數幾何的預設值。 這個方法只會產生實際的值,而不是用 SQL 來設定預設值。
protected virtual string Generate(System.Data.Entity.Spatial.DbGeometry defaultValue);
override this.Generate : System.Data.Entity.Spatial.DbGeometry -> string
Protected Overridable Function Generate (defaultValue As DbGeometry) As String
參數
- defaultValue
- DbGeometry
要設定的價值。
傳回
SQL 代表預設值。
適用於
Generate(DateTime)
Generate(DateTimeOffset)
產生 SQL 以指定欄位設定一個常數的 DateTimeOffset 預設值。 這個方法只會產生實際的值,而不是用 SQL 來設定預設值。
protected virtual string Generate(DateTimeOffset defaultValue);
override this.Generate : DateTimeOffset -> string
Protected Overridable Function Generate (defaultValue As DateTimeOffset) As String
參數
- defaultValue
- DateTimeOffset
要設定的價值。
傳回
SQL 代表預設值。
適用於
Generate(TimeSpan)
產生 SQL 來指定欄位設定一個常數的 TimeSpan 預設值。 這個方法只會產生實際的值,而不是用 SQL 來設定預設值。
protected virtual string Generate(TimeSpan defaultValue);
override this.Generate : TimeSpan -> string
Protected Overridable Function Generate (defaultValue As TimeSpan) As String
參數
- defaultValue
- TimeSpan
要設定的價值。
傳回
SQL 代表預設值。
適用於
Generate(IEnumerable<MigrationOperation>, String)
將一組遷移操作轉換為 Microsoft SQL Server 專用的 SQL。
public override System.Collections.Generic.IEnumerable<System.Data.Entity.Migrations.Sql.MigrationStatement> Generate(System.Collections.Generic.IEnumerable<System.Data.Entity.Migrations.Model.MigrationOperation> migrationOperations, string providerManifestToken);
override this.Generate : seq<System.Data.Entity.Migrations.Model.MigrationOperation> * string -> seq<System.Data.Entity.Migrations.Sql.MigrationStatement>
Public Overrides Function Generate (migrationOperations As IEnumerable(Of MigrationOperation), providerManifestToken As String) As IEnumerable(Of MigrationStatement)
參數
- migrationOperations
- IEnumerable<MigrationOperation>
作業將被轉換。
- providerManifestToken
- String
標記代表目標的 SQL Server 版本(例如「2005」、「2008」)。
傳回
一份執行遷移操作的 SQL 語句清單。
適用於
Generate(ColumnModel, IndentedTextWriter)
為所指定的欄位模型產生 SQL。 此方法會被其他處理欄位的方法呼叫,並可覆寫以變更產生的 SQL。
protected internal void Generate(System.Data.Entity.Migrations.Model.ColumnModel column, System.Data.Entity.Migrations.Utilities.IndentedTextWriter writer);
override this.Generate : System.Data.Entity.Migrations.Model.ColumnModel * System.Data.Entity.Migrations.Utilities.IndentedTextWriter -> unit
Protected Friend Sub Generate (column As ColumnModel, writer As IndentedTextWriter)
參數
- column
- ColumnModel
就是產生 SQL 的欄位。
- writer
- IndentedTextWriter
產生的 SQL 應該寫給寫入者。
適用於
Generate(MoveProcedureOperation)
產生指定的移動程序操作。
protected virtual void Generate(System.Data.Entity.Migrations.Model.MoveProcedureOperation moveProcedureOperation);
override this.Generate : System.Data.Entity.Migrations.Model.MoveProcedureOperation -> unit
參數
- moveProcedureOperation
- MoveProcedureOperation
移動程序操作。
適用於
Generate(MigrationOperation)
產生 SQL 的 MigrationOperation。 允許衍生提供者處理更多操作類型。 產生的 SQL 應該使用 Statement 方法來新增。
protected virtual void Generate(System.Data.Entity.Migrations.Model.MigrationOperation migrationOperation);
override this.Generate : System.Data.Entity.Migrations.Model.MigrationOperation -> unit
參數
- migrationOperation
- MigrationOperation
產生 SQL 的操作。
適用於
Generate(MoveTableOperation)
產生 SQL 的 MoveTableOperation。 產生的 SQL 應該使用 Statement 方法來新增。
protected virtual void Generate(System.Data.Entity.Migrations.Model.MoveTableOperation moveTableOperation);
override this.Generate : System.Data.Entity.Migrations.Model.MoveTableOperation -> unit
參數
- moveTableOperation
- MoveTableOperation
產生 SQL 的操作。
適用於
Generate(DropTableOperation)
產生 SQL 的 DropTableOperation。 產生的 SQL 應該使用 Statement 方法來新增。
protected virtual void Generate(System.Data.Entity.Migrations.Model.DropTableOperation dropTableOperation);
override this.Generate : System.Data.Entity.Migrations.Model.DropTableOperation -> unit
參數
- dropTableOperation
- DropTableOperation
產生 SQL 的操作。
適用於
Generate(Byte[])
Generate(AddColumnOperation)
產生 SQL 的 AddColumnOperation。 產生的 SQL 應該使用 Statement 方法來新增。
protected virtual void Generate(System.Data.Entity.Migrations.Model.AddColumnOperation addColumnOperation);
override this.Generate : System.Data.Entity.Migrations.Model.AddColumnOperation -> unit
參數
- addColumnOperation
- AddColumnOperation
產生 SQL 的操作。
適用於
Generate(AddForeignKeyOperation)
產生 SQL 的 AddForeignKeyOperation。 產生的 SQL 應該使用 Statement 方法來新增。
protected virtual void Generate(System.Data.Entity.Migrations.Model.AddForeignKeyOperation addForeignKeyOperation);
override this.Generate : System.Data.Entity.Migrations.Model.AddForeignKeyOperation -> unit
參數
- addForeignKeyOperation
- AddForeignKeyOperation
產生 SQL 的操作。
適用於
Generate(AddPrimaryKeyOperation)
產生 SQL 的 AddPrimaryKeyOperation。 產生的 SQL 應該使用 Statement 方法來新增。
protected virtual void Generate(System.Data.Entity.Migrations.Model.AddPrimaryKeyOperation addPrimaryKeyOperation);
override this.Generate : System.Data.Entity.Migrations.Model.AddPrimaryKeyOperation -> unit
參數
- addPrimaryKeyOperation
- AddPrimaryKeyOperation
產生 SQL 的操作。
適用於
Generate(HistoryOperation)
產生 SQL 的 HistoryOperation。 產生的 SQL 應該使用 Statement 方法來新增。
protected virtual void Generate(System.Data.Entity.Migrations.Model.HistoryOperation historyOperation);
override this.Generate : System.Data.Entity.Migrations.Model.HistoryOperation -> unit
參數
- historyOperation
- HistoryOperation
產生 SQL 的操作。
適用於
Generate(AlterProcedureOperation)
產生指定的 alter 程序操作。
protected virtual void Generate(System.Data.Entity.Migrations.Model.AlterProcedureOperation alterProcedureOperation);
override this.Generate : System.Data.Entity.Migrations.Model.AlterProcedureOperation -> unit
參數
- alterProcedureOperation
- AlterProcedureOperation
替身程序操作。
適用於
Generate(AlterTableOperation)
當資料表定義或其屬性被更改時,覆寫此方法以產生 SQL。 此方法的預設實作不會執行任何動作。
protected internal virtual void Generate(System.Data.Entity.Migrations.Model.AlterTableOperation alterTableOperation);
override this.Generate : System.Data.Entity.Migrations.Model.AlterTableOperation -> unit
參數
- alterTableOperation
- AlterTableOperation
描述表格變更的操作。
適用於
Generate(AlterColumnOperation)
產生 SQL 的 AlterColumnOperation。 產生的 SQL 應該使用 Statement 方法來新增。
protected virtual void Generate(System.Data.Entity.Migrations.Model.AlterColumnOperation alterColumnOperation);
override this.Generate : System.Data.Entity.Migrations.Model.AlterColumnOperation -> unit
參數
- alterColumnOperation
- AlterColumnOperation
產生 SQL 的操作。
適用於
Generate(CreateProcedureOperation)
產生指定的建立程序操作。
protected virtual void Generate(System.Data.Entity.Migrations.Model.CreateProcedureOperation createProcedureOperation);
override this.Generate : System.Data.Entity.Migrations.Model.CreateProcedureOperation -> unit
參數
- createProcedureOperation
- CreateProcedureOperation
建立程序操作。
適用於
Generate(CreateTableOperation)
產生 SQL 的 CreateTableOperation。 產生的 SQL 應該使用 Statement 方法來新增。
protected virtual void Generate(System.Data.Entity.Migrations.Model.CreateTableOperation createTableOperation);
override this.Generate : System.Data.Entity.Migrations.Model.CreateTableOperation -> unit
參數
- createTableOperation
- CreateTableOperation
產生 SQL 的操作。
適用於
Generate(DropColumnOperation)
產生 SQL 的 DropColumnOperation。 產生的 SQL 應該使用 Statement 方法來新增。
protected virtual void Generate(System.Data.Entity.Migrations.Model.DropColumnOperation dropColumnOperation);
override this.Generate : System.Data.Entity.Migrations.Model.DropColumnOperation -> unit
參數
- dropColumnOperation
- DropColumnOperation
產生 SQL 的操作。
適用於
Generate(DropForeignKeyOperation)
產生 SQL 的 DropForeignKeyOperation。 產生的 SQL 應該使用 Statement 方法來新增。
protected virtual void Generate(System.Data.Entity.Migrations.Model.DropForeignKeyOperation dropForeignKeyOperation);
override this.Generate : System.Data.Entity.Migrations.Model.DropForeignKeyOperation -> unit
參數
- dropForeignKeyOperation
- DropForeignKeyOperation
產生 SQL 的操作。
適用於
Generate(DropIndexOperation)
產生 SQL 的 DropIndexOperation。 產生的 SQL 應該使用 Statement 方法來新增。
protected virtual void Generate(System.Data.Entity.Migrations.Model.DropIndexOperation dropIndexOperation);
override this.Generate : System.Data.Entity.Migrations.Model.DropIndexOperation -> unit
參數
- dropIndexOperation
- DropIndexOperation
產生 SQL 的操作。
適用於
Generate(DropPrimaryKeyOperation)
產生 SQL 的 DropPrimaryKeyOperation。 產生的 SQL 應該使用 Statement 方法來新增。
protected virtual void Generate(System.Data.Entity.Migrations.Model.DropPrimaryKeyOperation dropPrimaryKeyOperation);
override this.Generate : System.Data.Entity.Migrations.Model.DropPrimaryKeyOperation -> unit
參數
- dropPrimaryKeyOperation
- DropPrimaryKeyOperation
產生 SQL 的操作。
適用於
Generate(DropProcedureOperation)
產生指定的丟棄程序操作。
protected virtual void Generate(System.Data.Entity.Migrations.Model.DropProcedureOperation dropProcedureOperation);
override this.Generate : System.Data.Entity.Migrations.Model.DropProcedureOperation -> unit
參數
- dropProcedureOperation
- DropProcedureOperation
投放程序操作。
適用於
Generate(CreateIndexOperation)
產生 SQL 的 CreateIndexOperation。 產生的 SQL 應該使用 Statement 方法來新增。
protected virtual void Generate(System.Data.Entity.Migrations.Model.CreateIndexOperation createIndexOperation);
override this.Generate : System.Data.Entity.Migrations.Model.CreateIndexOperation -> unit
參數
- createIndexOperation
- CreateIndexOperation
產生 SQL 的操作。