MigrationsSqlGenerator.ColumnDefinition 方法

定义

重载

ColumnDefinition(AddColumnOperation, IModel, MigrationCommandListBuilder)

为 中的 AddColumnOperation列定义生成 SQL 片段。

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>, Nullable<Boolean>, Boolean, Boolean, Object, String, String, IAnnotatable, IModel, MigrationCommandListBuilder)

为给定列元数据的列定义生成 SQL 片段。

ColumnDefinition(AddColumnOperation, IModel, MigrationCommandListBuilder)

Source:
MigrationsSqlGenerator.cs
Source:
MigrationsSqlGenerator.cs
Source:
MigrationsSqlGenerator.cs
Source:
MigrationsSqlGenerator.cs
Source:
MigrationsSqlGenerator.cs
Source:
MigrationsSqlGenerator.cs
Source:
MigrationsSqlGenerator.cs
Source:
MigrationsSqlGenerator.cs
Source:
MigrationsSqlGenerator.cs

为 中的 AddColumnOperation列定义生成 SQL 片段。

protected virtual void ColumnDefinition (Microsoft.EntityFrameworkCore.Migrations.Operations.AddColumnOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
protected virtual void ColumnDefinition (Microsoft.EntityFrameworkCore.Migrations.Operations.AddColumnOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
abstract member ColumnDefinition : Microsoft.EntityFrameworkCore.Migrations.Operations.AddColumnOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
override this.ColumnDefinition : Microsoft.EntityFrameworkCore.Migrations.Operations.AddColumnOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overridable Sub ColumnDefinition (operation As AddColumnOperation, model As IModel, builder As MigrationCommandListBuilder)

参数

operation
AddColumnOperation

操作。

model
IModel

如果不存在模型的操作,则 null 为 的目标模型。

builder
MigrationCommandListBuilder

用于添加 SQL 片段的命令生成器。

适用于

ColumnDefinition(String, String, String, ColumnOperation, IModel, MigrationCommandListBuilder)

Source:
MigrationsSqlGenerator.cs
Source:
MigrationsSqlGenerator.cs
Source:
MigrationsSqlGenerator.cs
Source:
MigrationsSqlGenerator.cs
Source:
MigrationsSqlGenerator.cs
Source:
MigrationsSqlGenerator.cs
Source:
MigrationsSqlGenerator.cs

为给定列元数据的列定义生成 SQL 片段。

protected virtual void ColumnDefinition (string schema, string table, string name, Microsoft.EntityFrameworkCore.Migrations.Operations.ColumnOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
protected virtual void ColumnDefinition (string? schema, string table, string name, Microsoft.EntityFrameworkCore.Migrations.Operations.ColumnOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel? model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
abstract member ColumnDefinition : string * string * string * Microsoft.EntityFrameworkCore.Migrations.Operations.ColumnOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
override this.ColumnDefinition : string * string * string * Microsoft.EntityFrameworkCore.Migrations.Operations.ColumnOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overridable Sub ColumnDefinition (schema As String, table As String, name As String, operation As ColumnOperation, model As IModel, builder As MigrationCommandListBuilder)

参数

schema
String

包含表的架构,或使用 null 默认架构。

table
String

包含列的表。

name
String

列名称。

operation
ColumnOperation

列元数据。

model
IModel

如果不存在模型的操作,则 null 为 的目标模型。

builder
MigrationCommandListBuilder

用于添加 SQL 片段的命令生成器。

适用于

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

Source:
MigrationsSqlGenerator.cs
Source:
MigrationsSqlGenerator.cs

为给定列元数据的列定义生成 SQL 片段。

protected virtual void ColumnDefinition (string schema, string table, string name, Type clrType, string type, bool? unicode, int? maxLength, bool rowVersion, bool nullable, object defaultValue, string defaultValueSql, string computedColumnSql, Microsoft.EntityFrameworkCore.Infrastructure.IAnnotatable annotatable, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
abstract member ColumnDefinition : string * string * string * Type * string * Nullable<bool> * Nullable<int> * bool * bool * obj * string * string * Microsoft.EntityFrameworkCore.Infrastructure.IAnnotatable * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
override this.ColumnDefinition : string * string * string * Type * string * Nullable<bool> * Nullable<int> * bool * bool * obj * string * string * Microsoft.EntityFrameworkCore.Infrastructure.IAnnotatable * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overridable Sub ColumnDefinition (schema As String, table As String, name As String, clrType As Type, type As String, unicode As Nullable(Of Boolean), maxLength As Nullable(Of Integer), rowVersion As Boolean, nullable As Boolean, defaultValue As Object, defaultValueSql As String, computedColumnSql As String, annotatable As IAnnotatable, model As IModel, builder As MigrationCommandListBuilder)

参数

schema
String

包含表的架构,或使用 null 默认架构。

table
String

包含列的表。

name
String

列名称。

clrType
Type

列映射到的 CLR Type

type
String

列的数据库/存储类型;如果未指定, null 则为 。

unicode
Nullable<Boolean>

指示列是否可以包含 Unicode 数据,或者 null 这不适用或未指定。

maxLength
Nullable<Int32>

列可以包含的最大数据量,如果 null 不适用或未指定,则为 。

rowVersion
Boolean

指示此列是否为自动并发标记,例如SQL Server timestamp/rowversion。

nullable
Boolean

指示列是否可以存储 NULL 值。

defaultValue
Object

列的默认值。

defaultValueSql
String

要用于列的默认约束的 SQL 表达式。

computedColumnSql
String

用于计算列值的 SQL 表达式。

annotatable
IAnnotatable

用于 MigrationOperation 查找任何自定义批注的 。

model
IModel

如果不存在模型的操作,则 null 为 的目标模型。

builder
MigrationCommandListBuilder

用于添加 SQL 片段的命令生成器。

适用于

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

Source:
MigrationsSqlGenerator.cs
Source:
MigrationsSqlGenerator.cs

为给定列元数据的列定义生成 SQL 片段。

protected virtual void ColumnDefinition (string schema, string table, string name, Type clrType, string type, bool? unicode, int? maxLength, bool? fixedLength, bool rowVersion, bool nullable, object defaultValue, string defaultValueSql, string computedColumnSql, Microsoft.EntityFrameworkCore.Infrastructure.IAnnotatable annotatable, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
abstract member ColumnDefinition : string * string * string * Type * string * Nullable<bool> * Nullable<int> * Nullable<bool> * bool * bool * obj * string * string * Microsoft.EntityFrameworkCore.Infrastructure.IAnnotatable * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
override this.ColumnDefinition : string * string * string * Type * string * Nullable<bool> * Nullable<int> * Nullable<bool> * bool * bool * obj * string * string * Microsoft.EntityFrameworkCore.Infrastructure.IAnnotatable * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overridable Sub ColumnDefinition (schema As String, table As String, name As String, clrType As Type, type As String, unicode As Nullable(Of Boolean), maxLength As Nullable(Of Integer), fixedLength As Nullable(Of Boolean), rowVersion As Boolean, nullable As Boolean, defaultValue As Object, defaultValueSql As String, computedColumnSql As String, annotatable As IAnnotatable, model As IModel, builder As MigrationCommandListBuilder)

参数

schema
String

包含表的架构,或使用 null 默认架构。

table
String

包含列的表。

name
String

列名称。

clrType
Type

列映射到的 CLR Type

type
String

列的数据库/存储类型;如果未指定, null 则为 。

unicode
Nullable<Boolean>

指示列是否可以包含 Unicode 数据,或者 null 这不适用或未指定。

maxLength
Nullable<Int32>

列可以包含的最大数据量,如果 null 不适用或未指定,则为 。

fixedLength
Nullable<Boolean>

指示是否将列限制为固定长度数据。

rowVersion
Boolean

指示此列是否为自动并发标记,例如SQL Server timestamp/rowversion。

nullable
Boolean

指示列是否可以存储 NULL 值。

defaultValue
Object

列的默认值。

defaultValueSql
String

要用于列的默认约束的 SQL 表达式。

computedColumnSql
String

用于计算列值的 SQL 表达式。

annotatable
IAnnotatable

用于 MigrationOperation 查找任何自定义批注的 。

model
IModel

如果不存在模型的操作,则 null 为 的目标模型。

builder
MigrationCommandListBuilder

用于添加 SQL 片段的命令生成器。

适用于