Table of Contents

Class OdfSchemaColumn

Namespace
OdfKit.Database
Assembly
OdfKit.dll

Represents a table column definition. 表示資料表欄位定義。

public sealed class OdfSchemaColumn
Inheritance
OdfSchemaColumn
Inherited Members

Constructors

OdfSchemaColumn(string)

Short overload of OdfSchemaColumn that accepts name; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name;其餘可選參數使用預設值並轉呼叫最長 OdfSchemaColumn 多載。

public OdfSchemaColumn(string name)

Parameters

name string

OdfSchemaColumn(string, string)

Short overload of OdfSchemaColumn that accepts name and typeName; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name 與 typeName;其餘可選參數使用預設值並轉呼叫最長 OdfSchemaColumn 多載。

public OdfSchemaColumn(string name, string typeName)

Parameters

name string
typeName string

OdfSchemaColumn(string, string, bool)

Short overload of OdfSchemaColumn that accepts name, typeName, and isNullable; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、typeName 與 isNullable;其餘可選參數使用預設值並轉呼叫最長 OdfSchemaColumn 多載。

public OdfSchemaColumn(string name, string typeName, bool isNullable)

Parameters

name string
typeName string
isNullable bool

OdfSchemaColumn(string, string, bool, bool)

Initializes a new instance of the OdfSchemaColumn class. 初始化 OdfSchemaColumn 類別的新執行個體。

public OdfSchemaColumn(string name, string typeName, bool isNullable, bool isAutoIncrement)

Parameters

name string

The column name. / 欄位名稱。

typeName string

The data type name. / 資料型別名稱。

isNullable bool

Whether null is allowed. / 是否允許為 null。

isAutoIncrement bool

Whether this is an auto-increment column. / 是否為自動遞增欄位。

Exceptions

ArgumentException

When name is empty. / 當 name 為空時擲出。

Properties

CheckConstraint

Gets or sets the check constraint expression of the column. 取得或設定欄位的檢查約束表達式。

public string? CheckConstraint { get; set; }

Property Value

string

DefaultValue

Gets or sets the default value expression of the column. 取得或設定欄位的預設值表達式。

public string? DefaultValue { get; set; }

Property Value

string

IsAutoIncrement

Gets or sets a value indicating whether this column is auto-incrementing. 取得或設定一個值,指示該欄位是否為自動遞增欄位。

public bool IsAutoIncrement { get; set; }

Property Value

bool

IsNullable

Gets or sets a value indicating whether this column allows null. 取得或設定一個值,指示該欄位是否允許為 null。

public bool IsNullable { get; set; }

Property Value

bool

IsUnique

Gets or sets a value indicating whether this column has a unique constraint. 取得或設定一個值,指示該欄位是否具有唯一值約束。

public bool IsUnique { get; set; }

Property Value

bool

Name

Gets the column name. 取得欄位名稱。

public string Name { get; }

Property Value

string

TypeName

Gets or sets the data type name. 取得或設定資料型別名稱。

public string TypeName { get; set; }

Property Value

string