Table of Contents

Class OdfDatabaseDocument

Namespace
OdfKit.Database
Assembly
OdfKit.dll

Provides the OdfDatabaseDocument API. 提供 OdfDatabaseDocument API。

public class OdfDatabaseDocument : OdfDocument, IDisposable, IAsyncDisposable
Inheritance
OdfDatabaseDocument
Implements
Derived
Inherited Members

Constructors

OdfDatabaseDocument(OdfPackage)

Initializes a new instance of the OdfDatabaseDocument class with the specified ODF package. 使用指定的 ODF 封裝初始化 OdfDatabaseDocument 類別的新執行個體。

public OdfDatabaseDocument(OdfPackage package)

Parameters

package OdfPackage

The ODF package. / ODF 封裝。

Properties

ConnectionHref

Gets the current data source connection reference. 取得目前資料來源連線參照。

public string? ConnectionHref { get; }

Property Value

string

DataSourceSettings

Gets the list of currently declared data source settings. 取得目前宣告的資料來源設定清單。

public IReadOnlyList<OdfDatabaseDataSourceSettingInfo> DataSourceSettings { get; }

Property Value

IReadOnlyList<OdfDatabaseDataSourceSettingInfo>

DatabaseNode

Gets the main database node. 取得主要資料庫節點。

public OdfNode DatabaseNode { get; }

Property Value

OdfNode

Forms

Gets the list of currently declared form components. 取得目前宣告的表單元件清單。

public IReadOnlyList<OdfDatabaseFormInfo> Forms { get; }

Property Value

IReadOnlyList<OdfDatabaseFormInfo>

Queries

Gets the list of currently declared query descriptions. 取得目前宣告的查詢描述清單。

public IReadOnlyList<OdfDatabaseQueryInfo> Queries { get; }

Property Value

IReadOnlyList<OdfDatabaseQueryInfo>

Reports

Gets the list of currently declared report components. 取得目前宣告的報表元件清單。

public IReadOnlyList<OdfDatabaseReportInfo> Reports { get; }

Property Value

IReadOnlyList<OdfDatabaseReportInfo>

Schema

Gets the schema definition accessor for this database document, providing high-level table structure and relationship settings. 取得此資料庫文件的 Schema 定義存取器,提供高階的資料表結構與關聯設定。

public OdfDatabaseSchema Schema { get; }

Property Value

OdfDatabaseSchema

Tables

Gets the list of currently declared table descriptions. 取得目前宣告的資料表描述清單。

public IReadOnlyList<OdfDatabaseTableInfo> Tables { get; }

Property Value

IReadOnlyList<OdfDatabaseTableInfo>

Methods

AddDataSourceSetting(string, OdfDatabaseDataSourceSettingType, bool, params string[])

Adds a data source setting. 新增資料來源設定。

public OdfNode AddDataSourceSetting(string name, OdfDatabaseDataSourceSettingType type, bool isList, params string[] values)

Parameters

name string

The setting name. / 設定名稱。

type OdfDatabaseDataSourceSettingType

The setting value type. / 設定值型別。

isList bool

Whether the setting value is a list. / 設定值是否為清單。

values string[]

The list of setting values. / 設定值清單。

Returns

OdfNode

The added data source setting node. / 新增的資料來源設定節點。

Exceptions

InvalidOperationException

When the data source connection has not been set. / 當尚未設定資料來源連線時擲出。

AddDataSourceSetting(string, OdfDatabaseDataSourceSettingType, string)

Adds a data source setting. 新增資料來源設定。

public OdfNode AddDataSourceSetting(string name, OdfDatabaseDataSourceSettingType type, string value)

Parameters

name string

The setting name. / 設定名稱。

type OdfDatabaseDataSourceSettingType

The setting value type. / 設定值型別。

value string

The setting value. / 設定值。

Returns

OdfNode

The added data source setting node. / 新增的資料來源設定節點。

Exceptions

InvalidOperationException

When the data source connection has not been set. / 當尚未設定資料來源連線時擲出。

AddForm(string)

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

public OdfNode AddForm(string name)

Parameters

name string

Returns

OdfNode

AddForm(string, string?)

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

public OdfNode AddForm(string name, string? href)

Parameters

name string
href string

Returns

OdfNode

AddForm(string, string?, string?)

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

public OdfNode AddForm(string name, string? href, string? title)

Parameters

name string
href string
title string

Returns

OdfNode

AddForm(string, string?, string?, string?)

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

public OdfNode AddForm(string name, string? href, string? title, string? description)

Parameters

name string
href string
title string
description string

Returns

OdfNode

AddForm(string, string?, string?, string?, bool?)

Adds a form component description. 新增表單元件描述。

public OdfNode AddForm(string name, string? href, string? title, string? description, bool? asTemplate)

Parameters

name string

The form name. / 表單名稱。

href string

The optional form resource reference path. / 選用的表單資源參照路徑。

title string

The optional display title. / 選用的顯示標題。

description string

The optional description text. / 選用的描述文字。

asTemplate bool?

The optional template marker. / 選用的範本標記。

Returns

OdfNode

The added form component node. / 新增的表單元件節點。

AddParameterizedQuery(string, string, IEnumerable<OdfDatabaseQueryParameter>)

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

public OdfNode AddParameterizedQuery(string name, string command, IEnumerable<OdfDatabaseQueryParameter> parameters)

Parameters

name string
command string
parameters IEnumerable<OdfDatabaseQueryParameter>

Returns

OdfNode

AddParameterizedQuery(string, string, IEnumerable<OdfDatabaseQueryParameter>, string?)

Adds a parameterized query description without executing SQL. 新增參數化查詢描述,但不執行 SQL。

public OdfNode AddParameterizedQuery(string name, string command, IEnumerable<OdfDatabaseQueryParameter> parameters, string? title)

Parameters

name string

The query name. / 查詢名稱。

command string

The query command or SQL content. / 查詢命令或 SQL 內容。

parameters IEnumerable<OdfDatabaseQueryParameter>

The query parameter metadata. / 查詢參數中繼資料。

title string

The optional display title. / 選用顯示標題。

Returns

OdfNode

The added query node. / 新增的查詢節點。

AddQuery(string, string)

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

public OdfNode AddQuery(string name, string command)

Parameters

name string
command string

Returns

OdfNode

AddQuery(string, string, string?)

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

public OdfNode AddQuery(string name, string command, string? title)

Parameters

name string
command string
title string

Returns

OdfNode

AddQuery(string, string, string?, string?)

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

public OdfNode AddQuery(string name, string command, string? title, string? description)

Parameters

name string
command string
title string
description string

Returns

OdfNode

AddQuery(string, string, string?, string?, bool?)

Adds a query description. 新增查詢描述。

public OdfNode AddQuery(string name, string command, string? title, string? description, bool? escapeProcessing)

Parameters

name string

The query name. / 查詢名稱。

command string

The query command or SQL content. / 查詢命令或 SQL 內容。

title string

The optional display title. / 選用的顯示標題。

description string

The optional description text. / 選用的描述文字。

escapeProcessing bool?

The optional SQL escape processing setting. / 選用的 SQL escape processing 設定。

Returns

OdfNode

The added query node. / 新增的查詢節點。

AddReport(string)

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

public OdfNode AddReport(string name)

Parameters

name string

Returns

OdfNode

AddReport(string, string?)

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

public OdfNode AddReport(string name, string? href)

Parameters

name string
href string

Returns

OdfNode

AddReport(string, string?, string?)

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

public OdfNode AddReport(string name, string? href, string? title)

Parameters

name string
href string
title string

Returns

OdfNode

AddReport(string, string?, string?, string?)

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

public OdfNode AddReport(string name, string? href, string? title, string? description)

Parameters

name string
href string
title string
description string

Returns

OdfNode

AddReport(string, string?, string?, string?, bool?)

Adds a report component description. 新增報表元件描述。

public OdfNode AddReport(string name, string? href, string? title, string? description, bool? asTemplate)

Parameters

name string

The report name. / 報表名稱。

href string

The optional report resource reference path. / 選用的報表資源參照路徑。

title string

The optional display title. / 選用的顯示標題。

description string

The optional description text. / 選用的描述文字。

asTemplate bool?

The optional template marker. / 選用的範本標記。

Returns

OdfNode

The added report component node. / 新增的報表元件節點。

AddTable(string)

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

public OdfNode AddTable(string name)

Parameters

name string

Returns

OdfNode

AddTable(string, string?)

Adds a table description. 新增資料表描述。

public OdfNode AddTable(string name, string? command)

Parameters

name string

The table name. / 資料表名稱。

command string

The optional table command or source name. / 選用的資料表命令或來源名稱。

Returns

OdfNode

The added table node. / 新增的資料表節點。

AddTableSchema(string, IEnumerable<string>)

Adds a table schema description as a table representation command hint. 以資料表表示命令提示新增資料表 schema 描述。

public OdfNode AddTableSchema(string name, IEnumerable<string> columns)

Parameters

name string

The table name. / 資料表名稱。

columns IEnumerable<string>

The column declarations. / 欄位宣告。

Returns

OdfNode

The added table node. / 新增的資料表節點。

ConfigureConnection(string)

Configures the data source connection and returns this document for chaining. 設定資料來源連線並傳回目前文件以支援鏈式呼叫。

public OdfDatabaseDocument ConfigureConnection(string href)

Parameters

href string

The connection resource path or URL. / 連線資源路徑或 URL。

Returns

OdfDatabaseDocument

The current database document. / 目前資料庫文件。

Create()

Creates a new ODB database document. 建立新的 ODB 資料庫文件。

public static OdfDatabaseDocument Create()

Returns

OdfDatabaseDocument

A new OdfDatabaseDocument instance. / 新的 OdfDatabaseDocument 執行個體。

FindDataSourceSetting(string)

Finds a data source setting by name. 依名稱尋找資料來源設定。

public OdfDatabaseDataSourceSettingInfo? FindDataSourceSetting(string name)

Parameters

name string

The setting name. / 設定名稱。

Returns

OdfDatabaseDataSourceSettingInfo

The matching data source setting, or null if not found. / 符合名稱的資料來源設定;找不到時為 null

FindForm(string)

Finds a form component by name. 依名稱尋找表單元件。

public OdfDatabaseFormInfo? FindForm(string name)

Parameters

name string

The form name. / 表單名稱。

Returns

OdfDatabaseFormInfo

The matching form component, or null if not found. / 符合名稱的表單元件;找不到時為 null

FindQuery(string)

Finds a query description by name. 依名稱尋找查詢描述。

public OdfDatabaseQueryInfo? FindQuery(string name)

Parameters

name string

The query name. / 查詢名稱。

Returns

OdfDatabaseQueryInfo

The matching query description, or null if not found. / 符合名稱的查詢描述;找不到時為 null

FindQueryFilterStatement(string)

Finds the filter statement of the specified query (db:filter-statement). 尋找指定查詢的篩選陳述式(db:filter-statement)。

public OdfDatabaseQueryStatementInfo? FindQueryFilterStatement(string queryName)

Parameters

queryName string

The query name. / 查詢名稱。

Returns

OdfDatabaseQueryStatementInfo

The filter statement summary, or null if not set. / 篩選陳述式摘要;若未設定則為 null

FindQueryOrderStatement(string)

Finds the order statement of the specified query (db:order-statement). 尋找指定查詢的排序陳述式(db:order-statement)。

public OdfDatabaseQueryStatementInfo? FindQueryOrderStatement(string queryName)

Parameters

queryName string

The query name. / 查詢名稱。

Returns

OdfDatabaseQueryStatementInfo

The order statement summary, or null if not set. / 排序陳述式摘要;若未設定則為 null

FindQueryUpdateTable(string)

Finds the updatable target table name of the specified query (db:update-table). 尋找指定查詢的可更新目標資料表名稱(db:update-table)。

public string? FindQueryUpdateTable(string queryName)

Parameters

queryName string

The query name. / 查詢名稱。

Returns

string

The target table name, or null if not set. / 目標資料表名稱;若未設定則為 null

FindReport(string)

Finds a report component by name. 依名稱尋找報表元件。

public OdfDatabaseReportInfo? FindReport(string name)

Parameters

name string

The report name. / 報表名稱。

Returns

OdfDatabaseReportInfo

The matching report component, or null if not found. / 符合名稱的報表元件;找不到時為 null

FindTable(string)

Finds a table description by name. 依名稱尋找資料表描述。

public OdfDatabaseTableInfo? FindTable(string name)

Parameters

name string

The table name. / 資料表名稱。

Returns

OdfDatabaseTableInfo

The matching table description, or null if not found. / 符合名稱的資料表描述;找不到時為 null

GetDataSourceSettings()

Gets the list of currently declared data source settings. 取得目前宣告的資料來源設定清單。

public IReadOnlyList<OdfDatabaseDataSourceSettingInfo> GetDataSourceSettings()

Returns

IReadOnlyList<OdfDatabaseDataSourceSettingInfo>

The list of data source settings. / 資料來源設定清單。

GetDefaultContentXml()

Gets the default content XML string. 取得預設的內容 XML 字串。

protected override string GetDefaultContentXml()

Returns

string

The default content XML string. / 預設的內容 XML 字串。

GetDefaultStylesXml()

Gets the default styles XML string. 取得預設的樣式 XML 字串。

protected override string GetDefaultStylesXml()

Returns

string

The default styles XML string. / 預設的樣式 XML 字串。

GetDriverSettings()

Gets the driver settings of the current data source connection. 取得目前資料來源連線的驅動程式設定。

public OdfDatabaseDriverSettingsInfo? GetDriverSettings()

Returns

OdfDatabaseDriverSettingsInfo

The driver settings summary, or null if not set. / 驅動程式設定摘要;若未設定則為 null

GetForms()

Gets the list of currently declared form components. 取得目前宣告的表單元件清單。

public IReadOnlyList<OdfDatabaseFormInfo> GetForms()

Returns

IReadOnlyList<OdfDatabaseFormInfo>

The list of form components. / 表單元件清單。

GetLogin()

Gets the login settings of the current data source connection. 取得目前資料來源連線的登入設定。

public OdfDatabaseLoginInfo? GetLogin()

Returns

OdfDatabaseLoginInfo

The login settings summary, or null if not set. / 登入設定摘要;若未設定則為 null

GetQueries()

Gets the list of currently declared query descriptions. 取得目前宣告的查詢描述清單。

public IReadOnlyList<OdfDatabaseQueryInfo> GetQueries()

Returns

IReadOnlyList<OdfDatabaseQueryInfo>

The list of query descriptions. / 查詢描述清單。

GetQueryColumns(string)

Gets the list of visible column names in the specified query (db:columns). 取得指定查詢中可見欄位的名稱清單(db:columns)。

public IReadOnlyList<string> GetQueryColumns(string queryName)

Parameters

queryName string

The query name. / 查詢名稱。

Returns

IReadOnlyList<string>

The list of visible column names. / 可見欄位名稱清單。

GetReports()

Gets the list of currently declared report components. 取得目前宣告的報表元件清單。

public IReadOnlyList<OdfDatabaseReportInfo> GetReports()

Returns

IReadOnlyList<OdfDatabaseReportInfo>

The list of report components. / 報表元件清單。

GetSummary()

Gets a practical summary of the database document. 取得資料庫文件的實務摘要。

public OdfDatabaseSummaryInfo GetSummary()

Returns

OdfDatabaseSummaryInfo

The database summary. / 資料庫摘要。

GetTables()

Gets the list of currently declared table descriptions. 取得目前宣告的資料表描述清單。

public IReadOnlyList<OdfDatabaseTableInfo> GetTables()

Returns

IReadOnlyList<OdfDatabaseTableInfo>

The list of table descriptions. / 資料表描述清單。

Load(Stream)

Loads an ODB database document from the specified stream. 從指定資料流載入 ODB 資料庫文件。

public static OdfDatabaseDocument Load(Stream stream)

Parameters

stream Stream

Returns

OdfDatabaseDocument

The loaded OdfDatabaseDocument instance. / 載入完成的 OdfDatabaseDocument 執行個體。

Exceptions

InvalidOperationException

When the specified document is not an ODB database. / 當指定文件不是 ODB 資料庫時擲出。

Load(Stream, string?)

Full overload of Load that accepts stream and fileName. Load 完整多載:接受 stream 與 fileName。

public static OdfDatabaseDocument Load(Stream stream, string? fileName)

Parameters

stream Stream
fileName string

Returns

OdfDatabaseDocument

Load(string)

Loads an ODB database document from the specified path. 從指定路徑載入 ODB 資料庫文件。

public static OdfDatabaseDocument Load(string path)

Parameters

path string

The ODB document path. / ODB 文件路徑。

Returns

OdfDatabaseDocument

The loaded OdfDatabaseDocument instance. / 載入完成的 OdfDatabaseDocument 執行個體。

Exceptions

InvalidOperationException

When the specified document is not an ODB database. / 當指定文件不是 ODB 資料庫時擲出。

LoadAsync(Stream)

Asynchronously loads an ODB database document from the specified stream. 非同步從指定資料流載入 ODB 資料庫文件。

public static Task<OdfDatabaseDocument> LoadAsync(Stream stream)

Parameters

stream Stream

Returns

Task<OdfDatabaseDocument>

A task representing the asynchronous load operation, whose result is the loaded OdfDatabaseDocument. / 代表非同步載入作業的工作,其結果為載入完成的 OdfDatabaseDocument

LoadAsync(Stream, string?)

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

public static Task<OdfDatabaseDocument> LoadAsync(Stream stream, string? fileName)

Parameters

stream Stream
fileName string

Returns

Task<OdfDatabaseDocument>

LoadAsync(Stream, string?, CancellationToken)

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

public static Task<OdfDatabaseDocument> LoadAsync(Stream stream, string? fileName, CancellationToken cancellationToken)

Parameters

stream Stream
fileName string
cancellationToken CancellationToken

Returns

Task<OdfDatabaseDocument>

LoadAsync(Stream, CancellationToken)

Asynchronously loads the document from a stream with a cancellation token. 以取消語彙基元非同步從資料流載入文件。

public static Task<OdfDatabaseDocument> LoadAsync(Stream stream, CancellationToken cancellationToken)

Parameters

stream Stream

The document stream. / 文件資料流。

cancellationToken CancellationToken

The cancellation token. / 取消語彙基元。

Returns

Task<OdfDatabaseDocument>

A task whose result is the loaded document. / 代表非同步載入作業的工作,其結果為載入完成的文件。

LoadAsync(string)

Asynchronously loads an ODB database document from the specified path. 非同步從指定路徑載入 ODB 資料庫文件。

public static Task<OdfDatabaseDocument> LoadAsync(string path)

Parameters

path string

Returns

Task<OdfDatabaseDocument>

A task representing the asynchronous load operation, whose result is the loaded OdfDatabaseDocument. / 代表非同步載入作業的工作,其結果為載入完成的 OdfDatabaseDocument

LoadAsync(string, CancellationToken)

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

public static Task<OdfDatabaseDocument> LoadAsync(string path, CancellationToken cancellationToken)

Parameters

path string
cancellationToken CancellationToken

Returns

Task<OdfDatabaseDocument>

MergeContentNodes(OdfDocument, OdfMergeOptions, Dictionary<string, string>)

Merges the content nodes of a source database document into this document. 合併來源資料庫文件的內容節點至此文件。

protected override void MergeContentNodes(OdfDocument sourceDoc, OdfMergeOptions options, Dictionary<string, string> renameMap)

Parameters

sourceDoc OdfDocument

The source document. / 來源文件。

options OdfMergeOptions

The merge options. / 合併選項。

renameMap Dictionary<string, string>

The dictionary mapping renamed style names. / 樣式重新命名對照表。

Exceptions

ArgumentException

When the source document is not an OdfDatabaseDocument. / 當來源文件不是 OdfDatabaseDocument 時擲出。

RemoveDataSourceSetting(string)

Removes the data source setting with the specified name. 移除指定名稱的資料來源設定。

public bool RemoveDataSourceSetting(string name)

Parameters

name string

The setting name. / 設定名稱。

Returns

bool

true if the data source setting was removed successfully; otherwise false. / 如果成功移除資料來源設定,則為 true;否則為 false

RemoveForm(string)

Removes the form component with the specified name. 移除指定名稱的表單元件。

public bool RemoveForm(string name)

Parameters

name string

The form name. / 表單名稱。

Returns

bool

true if the form component was removed successfully; otherwise false. / 如果成功移除表單元件,則為 true;否則為 false

RemoveQuery(string)

Removes the query description with the specified name. 移除指定名稱的查詢描述。

public bool RemoveQuery(string name)

Parameters

name string

The query name. / 查詢名稱。

Returns

bool

true if the query description was removed successfully; otherwise false. / 如果成功移除查詢描述,則為 true;否則為 false

RemoveReport(string)

Removes the report component with the specified name. 移除指定名稱的報表元件。

public bool RemoveReport(string name)

Parameters

name string

The report name. / 報表名稱。

Returns

bool

true if the report component was removed successfully; otherwise false. / 如果成功移除報表元件,則為 true;否則為 false

RemoveTable(string)

Removes the table description with the specified name. 移除指定名稱的資料表描述。

public bool RemoveTable(string name)

Parameters

name string

The table name. / 資料表名稱。

Returns

bool

true if the table description was removed successfully; otherwise false. / 如果成功移除資料表描述,則為 true;否則為 false

SetConnection(string)

Sets the data source connection reference. 設定資料來源連線參照。

public void SetConnection(string href)

Parameters

href string

The connection resource path or URL. / 連線資源路徑或 URL。

SetDriverSettings()

Short overload of SetDriverSettings that uses default values for all optional parameters and forwards to the full overload. 便利多載:SetDriverSettings 的所有可選參數使用預設值並轉呼叫最長多載。

public OdfNode SetDriverSettings()

Returns

OdfNode

SetDriverSettings(bool?)

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

public OdfNode SetDriverSettings(bool? showDeleted)

Parameters

showDeleted bool?

Returns

OdfNode

SetDriverSettings(bool?, bool?)

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

public OdfNode SetDriverSettings(bool? showDeleted, bool? isFirstRowHeaderLine)

Parameters

showDeleted bool?
isFirstRowHeaderLine bool?

Returns

OdfNode

SetDriverSettings(bool?, bool?, bool?)

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

public OdfNode SetDriverSettings(bool? showDeleted, bool? isFirstRowHeaderLine, bool? parameterNameSubstitution)

Parameters

showDeleted bool?
isFirstRowHeaderLine bool?
parameterNameSubstitution bool?

Returns

OdfNode

SetDriverSettings(bool?, bool?, bool?, string?)

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

public OdfNode SetDriverSettings(bool? showDeleted, bool? isFirstRowHeaderLine, bool? parameterNameSubstitution, string? systemDriverSettings)

Parameters

showDeleted bool?
isFirstRowHeaderLine bool?
parameterNameSubstitution bool?
systemDriverSettings string

Returns

OdfNode

SetDriverSettings(bool?, bool?, bool?, string?, string?)

Sets the driver settings of the data source connection. 設定資料來源連線的驅動程式設定。

public OdfNode SetDriverSettings(bool? showDeleted, bool? isFirstRowHeaderLine, bool? parameterNameSubstitution, string? systemDriverSettings, string? baseDn)

Parameters

showDeleted bool?

The optional show-deleted-rows setting. / 選用的顯示已刪除資料列設定。

isFirstRowHeaderLine bool?

The optional first-row-as-header setting. / 選用的第一列視為標頭列設定。

parameterNameSubstitution bool?

The optional named parameter substitution setting. / 選用的具名參數替代設定。

systemDriverSettings string

The optional system driver settings string. / 選用的系統驅動程式設定字串。

baseDn string

The optional LDAP base DN setting. / 選用的 LDAP base DN 設定。

Returns

OdfNode

The added or updated driver settings node. / 新增或更新後的驅動程式設定節點。

SetLogin()

Short overload of SetLogin that uses default values for all optional parameters and forwards to the full overload. 便利多載:SetLogin 的所有可選參數使用預設值並轉呼叫最長多載。

public OdfNode SetLogin()

Returns

OdfNode

SetLogin(string?)

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

public OdfNode SetLogin(string? userName)

Parameters

userName string

Returns

OdfNode

SetLogin(string?, bool?)

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

public OdfNode SetLogin(string? userName, bool? useSystemUser)

Parameters

userName string
useSystemUser bool?

Returns

OdfNode

SetLogin(string?, bool?, bool?)

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

public OdfNode SetLogin(string? userName, bool? useSystemUser, bool? isPasswordRequired)

Parameters

userName string
useSystemUser bool?
isPasswordRequired bool?

Returns

OdfNode

SetLogin(string?, bool?, bool?, int?)

Sets the login settings of the data source connection. 設定資料來源連線的登入設定。

public OdfNode SetLogin(string? userName, bool? useSystemUser, bool? isPasswordRequired, int? loginTimeout)

Parameters

userName string

The optional user name. / 選用的使用者名稱。

useSystemUser bool?

The optional system user account setting. / 選用的系統使用者帳號設定。

isPasswordRequired bool?

The optional password-required setting. / 選用的密碼必填設定。

loginTimeout int?

The optional login timeout in seconds. / 選用的登入逾時秒數。

Returns

OdfNode

The added or updated login settings node. / 新增或更新後的登入設定節點。

SetQueryColumns(string, IEnumerable<string>)

Sets the list of visible columns of the specified query (db:columns). 設定指定查詢的可見欄位清單(db:columns)。

public OdfNode SetQueryColumns(string queryName, IEnumerable<string> columnNames)

Parameters

queryName string

The query name. / 查詢名稱。

columnNames IEnumerable<string>

The list of column names. / 欄位名稱清單。

Returns

OdfNode

The added or updated columns node. / 新增或更新後的欄位清單節點。

Exceptions

ArgumentException

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

SetQueryFilterStatement(string, string)

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

public OdfNode SetQueryFilterStatement(string queryName, string command)

Parameters

queryName string
command string

Returns

OdfNode

SetQueryFilterStatement(string, string, bool?)

Sets the filter statement of the specified query (db:filter-statement). 設定指定查詢的篩選陳述式(db:filter-statement)。

public OdfNode SetQueryFilterStatement(string queryName, string command, bool? applyCommand)

Parameters

queryName string

The query name. / 查詢名稱。

command string

The filter command text (e.g. the content of a WHERE clause). / 篩選命令文字(例如 WHERE 子句內容)。

applyCommand bool?

The optional apply setting. / 選用的套用設定。

Returns

OdfNode

The added or updated filter statement node. / 新增或更新後的篩選陳述式節點。

SetQueryOrderStatement(string, string)

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

public OdfNode SetQueryOrderStatement(string queryName, string command)

Parameters

queryName string
command string

Returns

OdfNode

SetQueryOrderStatement(string, string, bool?)

Sets the order statement of the specified query (db:order-statement). 設定指定查詢的排序陳述式(db:order-statement)。

public OdfNode SetQueryOrderStatement(string queryName, string command, bool? applyCommand)

Parameters

queryName string

The query name. / 查詢名稱。

command string

The order command text (e.g. the content of an ORDER BY clause). / 排序命令文字(例如 ORDER BY 子句內容)。

applyCommand bool?

The optional apply setting. / 選用的套用設定。

Returns

OdfNode

The added or updated order statement node. / 新增或更新後的排序陳述式節點。

SetQueryUpdateTable(string, string)

Sets the updatable target table name of the specified query (db:update-table). 設定指定查詢的可更新目標資料表名稱(db:update-table)。

public OdfNode SetQueryUpdateTable(string queryName, string tableName)

Parameters

queryName string

The query name. / 查詢名稱。

tableName string

The target table name. / 目標資料表名稱。

Returns

OdfNode

The added or updated target table node. / 新增或更新後的目標資料表節點。