语言

SqliteMigrationsSqlGenerator.ColumnDefinition 方法

定义

重载

ColumnDefinition(AddColumnOperation, IModel, MigrationCommandListBuilder)

Source:
SqliteMigrationsSqlGenerator.cs
Source:
SqliteMigrationsSqlGenerator.cs

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

protected override void ColumnDefinition(Microsoft.EntityFrameworkCore.Migrations.Operations.AddColumnOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
override this.ColumnDefinition : Microsoft.EntityFrameworkCore.Migrations.Operations.AddColumnOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overrides 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:
SqliteMigrationsSqlGenerator.cs
Source:
SqliteMigrationsSqlGenerator.cs
Source:
SqliteMigrationsSqlGenerator.cs
Source:
SqliteMigrationsSqlGenerator.cs
Source:
SqliteMigrationsSqlGenerator.cs
Source:
SqliteMigrationsSqlGenerator.cs
Source:
SqliteMigrationsSqlGenerator.cs
Source:
SqliteMigrationsSqlGenerator.cs
Source:
SqliteMigrationsSqlGenerator.cs

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

protected override 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 override void ColumnDefinition(string schema, string table, string name, Microsoft.EntityFrameworkCore.Migrations.Operations.ColumnOperation operation, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
override this.ColumnDefinition : string * string * string * Microsoft.EntityFrameworkCore.Migrations.Operations.ColumnOperation * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overrides 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:
SqliteMigrationsSqlGenerator.cs

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

protected override 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);
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 Overrides 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时间戳/行version。

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:
SqliteMigrationsSqlGenerator.cs
Source:
SqliteMigrationsSqlGenerator.cs

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

protected override 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);
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 Overrides 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时间戳/行version。

nullable
Boolean

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

defaultValue
Object

列的默认值。

defaultValueSql
String

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

computedColumnSql
String

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

annotatable
IAnnotatable

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

model
IModel

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

builder
MigrationCommandListBuilder

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

适用于