Table of Contents

TableSchema 类

命名空间
Shadow.DDL.Schemas
程序集
Shadow.DDL.dll

表结构

public class TableSchema : Identifier, ITable, ITableView, IInsertTable, IIdentifier, IMatch, IUpdateTable, ISqlEntity
继承
object
TableSchema
实现
继承成员
扩展方法

构造函数

TableSchema(string, ColumnSchema[], IConstraint[], string)

表结构

public TableSchema(string tableName, ColumnSchema[] columns, IConstraint[] constraints, string schema = "")

参数

tableName string

表名

columns ColumnSchema[]

constraints IConstraint[]

约束

schema string

TableSchema(string, ColumnSchema[], string)

表结构

public TableSchema(string tableName, ColumnSchema[] columns, string schema = "")

参数

tableName string
columns ColumnSchema[]
schema string

属性

Columns

字段

public ColumnSchema[] Columns { get; }

属性值

ColumnSchema[]

Constraints

约束

public IConstraint[] Constraints { get; }

属性值

IConstraint[]

Keys

主键

public ColumnSchema[] Keys { get; }

属性值

ColumnSchema[]

Schema

架构

public string Schema { get; }

属性值

string

方法

AddColumns(params ColumnSchema[])

添加列

public void AddColumns(params ColumnSchema[] columns)

参数

columns ColumnSchema[]

GetColumn(string)

查找字段

public ColumnSchema? GetColumn(string columName)

参数

columName string

列名

返回

ColumnSchema