Class OdfDatabaseSchema
Represents the schema definition accessor for an ODB database, used to model table structures, primary keys, and foreign key relationships. 表示 ODB 資料庫的 Schema 定義存取器,用於建模資料表結構、主鍵與外鍵關聯。
public sealed class OdfDatabaseSchema
- Inheritance
-
OdfDatabaseSchema
- Inherited Members
Properties
Tables
Gets all currently defined table structures in the schema. 取得目前 Schema 中所有已定義的資料表結構。
public IReadOnlyList<OdfSchemaTable> Tables { get; }
Property Value
Methods
AddTable(OdfSchemaTable)
Adds a table structure to the schema. 新增一個資料表結構至 Schema 中。
public void AddTable(OdfSchemaTable table)
Parameters
tableOdfSchemaTableThe table structure to add. / 要新增的資料表結構。
Exceptions
- ArgumentNullException
- InvalidOperationException
When a table with the same name already exists in the schema. / 當資料表名稱已存在於 Schema 中時擲出。
RemoveTable(string)
Removes the table structure with the specified name from the schema. 從 Schema 中移除指定名稱的資料表結構。
public bool RemoveTable(string tableName)
Parameters
tableNamestringThe name of the table to remove. / 要移除的資料表名稱。
Returns
Exceptions
- ArgumentException
When
tableNameis empty. / 當tableName為空時擲出。
Save()
Synchronizes the current schema state back to the database document. 將目前的結構描述狀態同步儲存回資料庫文件中。
public void Save()