Class OdfSchemaForeignKey
Represents a foreign key relationship definition model. 表示外鍵關聯定義模型。
public sealed class OdfSchemaForeignKey
- Inheritance
-
OdfSchemaForeignKey
- Inherited Members
Constructors
OdfSchemaForeignKey(string?, string, IEnumerable<OdfSchemaKeyMapping>)
Short overload of OdfSchemaForeignKey that accepts name, referencedTable, and keyColumns; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、referencedTable 與 keyColumns;其餘可選參數使用預設值並轉呼叫最長 OdfSchemaForeignKey 多載。
public OdfSchemaForeignKey(string? name, string referencedTable, IEnumerable<OdfSchemaKeyMapping> keyColumns)
Parameters
namestringreferencedTablestringkeyColumnsIEnumerable<OdfSchemaKeyMapping>
OdfSchemaForeignKey(string?, string, IEnumerable<OdfSchemaKeyMapping>, string?)
Short overload of OdfSchemaForeignKey that accepts name, referencedTable, keyColumns, and updateRule; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 name、referencedTable、keyColumns 與 updateRule;其餘可選參數使用預設值並轉呼叫最長 OdfSchemaForeignKey 多載。
public OdfSchemaForeignKey(string? name, string referencedTable, IEnumerable<OdfSchemaKeyMapping> keyColumns, string? updateRule)
Parameters
namestringreferencedTablestringkeyColumnsIEnumerable<OdfSchemaKeyMapping>updateRulestring
OdfSchemaForeignKey(string?, string, IEnumerable<OdfSchemaKeyMapping>, string?, string?)
Initializes a new instance of the OdfSchemaForeignKey class. 初始化 OdfSchemaForeignKey 類別的新執行個體。
public OdfSchemaForeignKey(string? name, string referencedTable, IEnumerable<OdfSchemaKeyMapping> keyColumns, string? updateRule, string? deleteRule)
Parameters
namestringThe foreign key constraint name. / 外鍵約束名稱。
referencedTablestringThe name of the referenced target table. / 被參照的目標資料表名稱。
keyColumnsIEnumerable<OdfSchemaKeyMapping>The list of foreign-key-to-primary-key column mappings. / 外鍵與主鍵欄位對應清單。
updateRulestringThe update rule. / 更新規則。
deleteRulestringThe delete rule. / 刪除規則。
Exceptions
- ArgumentException
When
referencedTableis empty. / 當referencedTable為空時擲出。- ArgumentNullException
Properties
DeleteRule
Gets the delete rule. 取得刪除規則。
public string? DeleteRule { get; }
Property Value
KeyColumns
Gets the list of foreign-key-to-primary-key column mappings. 取得外鍵與主鍵欄位的對應清單。
public List<OdfSchemaKeyMapping> KeyColumns { get; }
Property Value
Name
Gets the foreign key constraint name. 取得外鍵約束名稱。
public string? Name { get; }
Property Value
ReferencedTable
Gets the name of the referenced target table. 取得被參照的目標資料表名稱。
public string ReferencedTable { get; }
Property Value
UpdateRule
Gets the update rule. 取得更新規則。
public string? UpdateRule { get; }