Class OdfSchemaColumn
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
namestring
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
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
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
namestringThe column name. / 欄位名稱。
typeNamestringThe data type name. / 資料型別名稱。
isNullableboolWhether null is allowed. / 是否允許為 null。
isAutoIncrementboolWhether this is an auto-increment column. / 是否為自動遞增欄位。
Exceptions
- ArgumentException
When
nameis empty. / 當name為空時擲出。
Properties
CheckConstraint
Gets or sets the check constraint expression of the column. 取得或設定欄位的檢查約束表達式。
public string? CheckConstraint { get; set; }
Property Value
DefaultValue
Gets or sets the default value expression of the column. 取得或設定欄位的預設值表達式。
public string? DefaultValue { get; set; }
Property Value
IsAutoIncrement
Gets or sets a value indicating whether this column is auto-incrementing. 取得或設定一個值,指示該欄位是否為自動遞增欄位。
public bool IsAutoIncrement { get; set; }
Property Value
IsNullable
Gets or sets a value indicating whether this column allows null. 取得或設定一個值,指示該欄位是否允許為 null。
public bool IsNullable { get; set; }
Property Value
IsUnique
Gets or sets a value indicating whether this column has a unique constraint. 取得或設定一個值,指示該欄位是否具有唯一值約束。
public bool IsUnique { get; set; }
Property Value
Name
Gets the column name. 取得欄位名稱。
public string Name { get; }
Property Value
TypeName
Gets or sets the data type name. 取得或設定資料型別名稱。
public string TypeName { get; set; }