連線方法
用法
adbc_connection_get_info(connection, info_codes = NULL)
adbc_connection_get_objects(
connection,
depth = 0L,
catalog = NULL,
db_schema = NULL,
table_name = NULL,
table_type = NULL,
column_name = NULL
)
adbc_connection_get_table_schema(connection, catalog, db_schema, table_name)
adbc_connection_get_table_types(connection)
adbc_connection_read_partition(connection, serialized_partition)
adbc_connection_commit(connection)
adbc_connection_rollback(connection)
adbc_connection_cancel(connection)
adbc_connection_get_statistic_names(connection)
adbc_connection_get_statistics(
connection,
catalog,
db_schema,
table_name,
approximate = FALSE
)
adbc_connection_quote_identifier(connection, value, ...)
adbc_connection_quote_string(connection, value, ...)
參數
- connection
- info_codes
要取得的中繼資料代碼清單,或 NULL 以取得全部。有效值記錄在 adbc.h 標頭檔中。
- depth
要顯示的巢狀層級。如果為 0,顯示所有層級。如果為 1,僅顯示目錄(即 catalog_schemas 將為 null)。如果為 2,僅顯示目錄和結構描述(即 db_schema_tables 將為 null)。如果為 3,僅顯示目錄、結構描述和表格。
- catalog
僅顯示給定目錄中的表格。如果為 NULL,則不依目錄篩選。如果為空字串,則僅顯示沒有目錄的表格。可能是搜尋模式。
- db_schema
僅顯示給定資料庫結構描述中的表格。如果為 NULL,則不依資料庫結構描述篩選。如果為空字串,則僅顯示沒有資料庫結構描述的表格。可能是搜尋模式。
- table_name
限制特定表格的物件或統計查詢。如果為 NULL,則不依名稱篩選。可能是搜尋模式。
- table_type
僅顯示符合給定表格類型之一的表格。如果為 NULL,則顯示任何類型的表格。有效的表格類型可以從 GetTableTypes 取得。使用 NULL 項目終止清單。
- column_name
僅顯示具有給定名稱的欄位。如果為 NULL,則不依名稱篩選。可能是搜尋模式。
- serialized_partition
分割區描述符。
- approximate
如果為
FALSE
,則請求精確的統計值,否則允許盡力而為、近似值或快取值。資料庫可能會傳回近似值,無論如何,如結果所示。請求精確值可能很耗費資源或不受支援。- value
字串或識別符。
- ...
驅動程式特定的選項。對於預設方法,這些是轉換為字串的具名值。
值
adbc_connection_get_info()
、adbc_connection_get_objects()
、adbc_connection_get_table_types()
和adbc_connection_read_partition()
傳回 nanoarrow_array_stream。adbc_connection_get_table_schema()
傳回 nanoarrow_schemaadbc_connection_commit()
和adbc_connection_rollback()
傳回connection
,不可見地。
範例
db <- adbc_database_init(adbc_driver_void())
con <- adbc_connection_init(db)
# (not implemented by the void driver)
try(adbc_connection_get_info(con, 0))
#> Error in adbc_connection_get_info(con, 0) : NOT_IMPLEMENTED: GetInfo