adbc.h
#
ADBC: Arrow Database connectivity
An Arrow-based interface between applications and database drivers. ADBC aims to provide a vendor-independent API for SQL and Substrait-based database access that is targeted at analytics/OLAP use cases.
This API is intended to be implemented directly by drivers and used directly by client applications. To assist portability between different vendors, a “driver manager” library is also provided, which implements this same API, but dynamically loads drivers internally and forwards calls appropriately.
ADBC uses structs with free functions that operate on those structs to model objects.
In general, objects allow serialized access from multiple threads, but not concurrent access. Specific implementations may permit multiple threads.
- Version
1.0.0
Defines
-
ADBC#
-
ADBC_STATUS_OK#
No error.
-
ADBC_STATUS_UNKNOWN#
An unknown error occurred.
May indicate a driver-side or database-side error.
-
ADBC_STATUS_NOT_IMPLEMENTED#
The operation is not implemented or supported.
May indicate a driver-side or database-side error.
-
ADBC_STATUS_NOT_FOUND#
A requested resource was not found.
May indicate a driver-side or database-side error.
-
ADBC_STATUS_ALREADY_EXISTS#
A requested resource already exists.
May indicate a driver-side or database-side error.
-
ADBC_STATUS_INVALID_ARGUMENT#
The arguments are invalid, likely a programming error.
For instance, they may be of the wrong format, or out of range.
May indicate a driver-side or database-side error.
-
ADBC_STATUS_INVALID_STATE#
The preconditions for the operation are not met, likely a programming error.
For instance, the object may be uninitialized, or may have not been fully configured.
May indicate a driver-side or database-side error.
-
ADBC_STATUS_INVALID_DATA#
Invalid data was processed (not a programming error).
For instance, a division by zero may have occurred during query execution.
May indicate a database-side error only.
-
ADBC_STATUS_INTEGRITY#
The database’s integrity was affected.
For instance, a foreign key check may have failed, or a uniqueness constraint may have been violated.
May indicate a database-side error only.
-
ADBC_STATUS_INTERNAL#
An error internal to the driver or database occurred.
May indicate a driver-side or database-side error.
-
ADBC_STATUS_IO#
An I/O error occurred.
For instance, a remote service may be unavailable.
May indicate a driver-side or database-side error.
-
ADBC_STATUS_CANCELLED#
The operation was cancelled, not due to a timeout.
May indicate a driver-side or database-side error.
-
ADBC_STATUS_TIMEOUT#
The operation was cancelled due to a timeout.
May indicate a driver-side or database-side error.
-
ADBC_STATUS_UNAUTHENTICATED#
Authentication failed.
May indicate a database-side error only.
-
ADBC_STATUS_UNAUTHORIZED#
The client is not authorized to perform the given operation.
May indicate a database-side error only.
-
ADBC_VERSION_1_0_0#
ADBC revision 1.0.0.
When passed to an AdbcDriverInitFunc(), the driver parameter must point to an AdbcDriver.
-
ADBC_OPTION_VALUE_ENABLED#
Canonical option value for enabling an option.
For use as the value in SetOption calls.
-
ADBC_OPTION_VALUE_DISABLED#
Canonical option value for disabling an option.
For use as the value in SetOption calls.
-
ADBC_INFO_VENDOR_NAME#
The database vendor/product name (e.g. the server name). (type: utf8).
See also
-
ADBC_INFO_VENDOR_VERSION#
The database vendor/product version (type: utf8).
See also
-
ADBC_INFO_VENDOR_ARROW_VERSION#
The database vendor/product Arrow library version (type: utf8).
See also
-
ADBC_INFO_DRIVER_NAME#
The driver name (type: utf8).
See also
-
ADBC_INFO_DRIVER_VERSION#
The driver version (type: utf8).
See also
-
ADBC_INFO_DRIVER_ARROW_VERSION#
The driver Arrow library version (type: utf8).
See also
-
ADBC_OBJECT_DEPTH_ALL#
Return metadata on catalogs, schemas, tables, and columns.
See also
-
ADBC_OBJECT_DEPTH_CATALOGS#
Return metadata on catalogs only.
See also
-
ADBC_OBJECT_DEPTH_DB_SCHEMAS#
Return metadata on catalogs and schemas.
See also
-
ADBC_OBJECT_DEPTH_TABLES#
Return metadata on catalogs, schemas, and tables.
See also
-
ADBC_OBJECT_DEPTH_COLUMNS#
Return metadata on catalogs, schemas, tables, and columns.
See also
-
ADBC_CONNECTION_OPTION_AUTOCOMMIT#
The name of the canonical option for whether autocommit is enabled.
See also
-
ADBC_CONNECTION_OPTION_READ_ONLY#
The name of the canonical option for whether the current connection should be restricted to being read-only.
See also
-
ADBC_CONNECTION_OPTION_ISOLATION_LEVEL#
The name of the canonical option for setting the isolation level of a transaction.
Should only be used in conjunction with autocommit disabled and AdbcConnectionCommit / AdbcConnectionRollback. If the desired isolation level is not supported by a driver, it should return an appropriate error.
See also
-
ADBC_OPTION_ISOLATION_LEVEL_DEFAULT#
Use database or driver default isolation level.
See also
-
ADBC_OPTION_ISOLATION_LEVEL_READ_UNCOMMITTED#
The lowest isolation level. Dirty reads are allowed, so one transaction may see not-yet-committed changes made by others.
See also
-
ADBC_OPTION_ISOLATION_LEVEL_READ_COMMITTED#
Lock-based concurrency control keeps write locks until the end of the transaction, but read locks are released as soon as a SELECT is performed. Non-repeatable reads can occur in this isolation level.
More simply put, Read Committed is an isolation level that guarantees that any data read is committed at the moment it is read. It simply restricts the reader from seeing any intermediate, uncommitted, ‘dirty’ reads. It makes no promise whatsoever that if the transaction re-issues the read, it will find the same data; data is free to change after it is read.
See also
-
ADBC_OPTION_ISOLATION_LEVEL_REPEATABLE_READ#
Lock-based concurrency control keeps read AND write locks (acquired on selection data) until the end of the transaction.
However, range-locks are not managed, so phantom reads can occur. Write skew is possible at this isolation level in some systems.
See also
-
ADBC_OPTION_ISOLATION_LEVEL_SNAPSHOT#
This isolation guarantees that all reads in the transaction will see a consistent snapshot of the database and the transaction should only successfully commit if no updates conflict with any concurrent updates made since that snapshot.
See also
-
ADBC_OPTION_ISOLATION_LEVEL_SERIALIZABLE#
Serializability requires read and write locks to be released only at the end of the transaction. This includes acquiring range- locks when a select query uses a ranged WHERE clause to avoid phantom reads.
See also
-
ADBC_OPTION_ISOLATION_LEVEL_LINEARIZABLE#
The central distinction between serializability and linearizability is that serializability is a global property; a property of an entire history of operations and transactions. Linearizability is a local property; a property of a single operation/transaction.
Linearizability can be viewed as a special case of strict serializability where transactions are restricted to consist of a single operation applied to a single object.
See also
-
ADBC_INGEST_OPTION_TARGET_TABLE#
The name of the target table for a bulk insert.
The driver should attempt to create the table if it does not exist. If the table exists but has a different schema, ADBC_STATUS_ALREADY_EXISTS should be raised. Else, data should be appended to the target table.
-
ADBC_INGEST_OPTION_MODE#
Whether to create (the default) or append.
-
ADBC_INGEST_OPTION_MODE_CREATE#
Create the table and insert data; error if the table exists.
-
ADBC_INGEST_OPTION_MODE_APPEND#
Do not create the table, and insert data; error if the table does not exist (ADBC_STATUS_NOT_FOUND) or does not match the schema of the data to append (ADBC_STATUS_ALREADY_EXISTS).
Typedefs
-
typedef uint8_t AdbcStatusCode#
Error codes for operations that may fail.
-
typedef AdbcStatusCode (*AdbcDriverInitFunc)(int version, void *driver, struct AdbcError *error)#
Common entry point for drivers via the driver manager (which uses dlopen(3)/LoadLibrary). The driver manager is told to load a library and call a function of this type to load the driver.
Although drivers may choose any name for this function, the recommended name is “AdbcDriverInit”.
- Param version:
[in] The ADBC revision to attempt to initialize (see ADBC_VERSION_1_0_0).
- Param driver:
[out] The table of function pointers to initialize. Should be a pointer to the appropriate struct for the given version (see the documentation for the version).
- Param error:
[out] An optional location to return an error message if necessary.
- Return:
ADBC_STATUS_OK if the driver was initialized, or ADBC_STATUS_NOT_IMPLEMENTED if the version is not supported. In that case, clients may retry with a different version.
Functions
-
AdbcStatusCode AdbcDatabaseNew(struct AdbcDatabase *database, struct AdbcError *error)#
Allocate a new (but uninitialized) database.
Callers pass in a zero-initialized AdbcDatabase.
Drivers should allocate their internal data structure and set the private_data field to point to the newly allocated struct. This struct should be released when AdbcDatabaseRelease is called.
-
AdbcStatusCode AdbcDatabaseSetOption(struct AdbcDatabase *database, const char *key, const char *value, struct AdbcError *error)#
Set a char* option.
Options may be set before AdbcDatabaseInit. Some drivers may support setting options after initialization as well.
- Returns:
ADBC_STATUS_NOT_IMPLEMENTED if the option is not recognized
-
AdbcStatusCode AdbcDatabaseInit(struct AdbcDatabase *database, struct AdbcError *error)#
Finish setting options and initialize the database.
Some drivers may support setting options after initialization as well.
-
AdbcStatusCode AdbcDatabaseRelease(struct AdbcDatabase *database, struct AdbcError *error)#
Destroy this database. No connections may exist.
- Parameters:
database – [in] The database to release.
error – [out] An optional location to return an error message if necessary.
-
AdbcStatusCode AdbcConnectionNew(struct AdbcConnection *connection, struct AdbcError *error)#
Allocate a new (but uninitialized) connection.
Callers pass in a zero-initialized AdbcConnection.
Drivers should allocate their internal data structure and set the private_data field to point to the newly allocated struct. This struct should be released when AdbcConnectionRelease is called.
-
AdbcStatusCode AdbcConnectionSetOption(struct AdbcConnection *connection, const char *key, const char *value, struct AdbcError *error)#
Set a char* option.
Options may be set before AdbcConnectionInit. Some drivers may support setting options after initialization as well.
- Returns:
ADBC_STATUS_NOT_IMPLEMENTED if the option is not recognized
-
AdbcStatusCode AdbcConnectionInit(struct AdbcConnection *connection, struct AdbcDatabase *database, struct AdbcError *error)#
Finish setting options and initialize the connection.
Some drivers may support setting options after initialization as well.
-
AdbcStatusCode AdbcConnectionRelease(struct AdbcConnection *connection, struct AdbcError *error)#
Destroy this connection.
- Parameters:
connection – [in] The connection to release.
error – [out] An optional location to return an error message if necessary.
-
AdbcStatusCode AdbcConnectionGetInfo(struct AdbcConnection *connection, uint32_t *info_codes, size_t info_codes_length, struct ArrowArrayStream *out, struct AdbcError *error)#
Get metadata about the database/driver.
The result is an Arrow dataset with the following schema:
Field Name
Field Type
info_name
uint32 not null
info_value
INFO_SCHEMA
INFO_SCHEMA is a dense union with members:
Field Name (Type Code)
Field Type
string_value (0)
utf8
bool_value (1)
bool
int64_value (2)
int64
int32_bitmask (3)
int32
string_list (4)
list<utf8>
int32_to_int32_list_map (5)
map<int32, list<int32>>
Each metadatum is identified by an integer code. The recognized codes are defined as constants. Codes [0, 10_000) are reserved for ADBC usage. Drivers/vendors will ignore requests for unrecognized codes (the row will be omitted from the result).
- Parameters:
connection – [in] The connection to query.
info_codes – [in] A list of metadata codes to fetch, or NULL to fetch all.
info_codes_length – [in] The length of the info_codes parameter. Ignored if info_codes is NULL.
out – [out] The result set.
error – [out] Error details, if an error occurs.
-
AdbcStatusCode AdbcConnectionGetObjects(struct AdbcConnection *connection, int depth, const char *catalog, const char *db_schema, const char *table_name, const char **table_type, const char *column_name, struct ArrowArrayStream *out, struct AdbcError *error)#
Get a hierarchical view of all catalogs, database schemas, tables, and columns.
The result is an Arrow dataset with the following schema:
Field Name
Field Type
catalog_name
utf8
catalog_db_schemas
list<DB_SCHEMA_SCHEMA>
DB_SCHEMA_SCHEMA is a Struct with fields:
Field Name
Field Type
db_schema_name
utf8
db_schema_tables
list<TABLE_SCHEMA>
TABLE_SCHEMA is a Struct with fields:
Field Name
Field Type
table_name
utf8 not null
table_type
utf8 not null
table_columns
list<COLUMN_SCHEMA>
table_constraints
list<CONSTRAINT_SCHEMA>
COLUMN_SCHEMA is a Struct with fields:
Field Name
Field Type
Comments
column_name
utf8 not null
ordinal_position
int32
(1)
remarks
utf8
(2)
xdbc_data_type
int16
(3)
xdbc_type_name
utf8
(3)
xdbc_column_size
int32
(3)
xdbc_decimal_digits
int16
(3)
xdbc_num_prec_radix
int16
(3)
xdbc_nullable
int16
(3)
xdbc_column_def
utf8
(3)
xdbc_sql_data_type
int16
(3)
xdbc_datetime_sub
int16
(3)
xdbc_char_octet_length
int32
(3)
xdbc_is_nullable
utf8
(3)
xdbc_scope_catalog
utf8
(3)
xdbc_scope_schema
utf8
(3)
xdbc_scope_table
utf8
(3)
xdbc_is_autoincrement
bool
(3)
xdbc_is_generatedcolumn
bool
(3)
The column’s ordinal position in the table (starting from 1).
Database-specific description of the column.
Optional value. Should be null if not supported by the driver. xdbc_ values are meant to provide JDBC/ODBC-compatible metadata in an agnostic manner.
CONSTRAINT_SCHEMA is a Struct with fields:
Field Name
Field Type
Comments
constraint_name
utf8
constraint_type
utf8 not null
(1)
constraint_column_names
list<utf8> not null
(2)
constraint_column_usage
list<USAGE_SCHEMA>
(3)
One of ‘CHECK’, ‘FOREIGN KEY’, ‘PRIMARY KEY’, or ‘UNIQUE’.
The columns on the current table that are constrained, in order.
For FOREIGN KEY only, the referenced table and columns.
USAGE_SCHEMA is a Struct with fields:
Field Name
Field Type
fk_catalog
utf8
fk_db_schema
utf8
fk_table
utf8 not null
fk_column_name
utf8 not null
- Parameters:
connection – [in] The database connection.
depth – [in] The level of nesting to display. If 0, display all levels. If 1, display only catalogs (i.e. catalog_schemas will be null). If 2, display only catalogs and schemas (i.e. db_schema_tables will be null), and so on.
catalog – [in] Only show tables in the given catalog. If NULL, do not filter by catalog. If an empty string, only show tables without a catalog. May be a search pattern (see section documentation).
db_schema – [in] Only show tables in the given database schema. If NULL, do not filter by database schema. If an empty string, only show tables without a database schema. May be a search pattern (see section documentation).
table_name – [in] Only show tables with the given name. If NULL, do not filter by name. May be a search pattern (see section documentation).
table_type – [in] Only show tables matching one of the given table types. If NULL, show tables of any type. Valid table types can be fetched from GetTableTypes. Terminate the list with a NULL entry.
column_name – [in] Only show columns with the given name. If NULL, do not filter by name. May be a search pattern (see section documentation).
out – [out] The result set.
error – [out] Error details, if an error occurs.
-
AdbcStatusCode AdbcConnectionGetTableSchema(struct AdbcConnection *connection, const char *catalog, const char *db_schema, const char *table_name, struct ArrowSchema *schema, struct AdbcError *error)#
Get the Arrow schema of a table.
- Parameters:
connection – [in] The database connection.
catalog – [in] The catalog (or nullptr if not applicable).
db_schema – [in] The database schema (or nullptr if not applicable).
table_name – [in] The table name.
schema – [out] The table schema.
error – [out] Error details, if an error occurs.
-
AdbcStatusCode AdbcConnectionGetTableTypes(struct AdbcConnection *connection, struct ArrowArrayStream *out, struct AdbcError *error)#
Get a list of table types in the database.
The result is an Arrow dataset with the following schema:
Field Name
Field Type
table_type
utf8 not null
- Parameters:
connection – [in] The database connection.
out – [out] The result set.
error – [out] Error details, if an error occurs.
-
AdbcStatusCode AdbcConnectionReadPartition(struct AdbcConnection *connection, const uint8_t *serialized_partition, size_t serialized_length, struct ArrowArrayStream *out, struct AdbcError *error)#
Construct a statement for a partition of a query. The results can then be read independently.
A partition can be retrieved from AdbcPartitions.
- Parameters:
connection – [in] The connection to use. This does not have to be the same connection that the partition was created on.
serialized_partition – [in] The partition descriptor.
serialized_length – [in] The partition descriptor length.
out – [out] The result set.
error – [out] Error details, if an error occurs.
-
AdbcStatusCode AdbcConnectionCommit(struct AdbcConnection *connection, struct AdbcError *error)#
Commit any pending transactions. Only used if autocommit is disabled.
Behavior is undefined if this is mixed with SQL transaction statements.
-
AdbcStatusCode AdbcConnectionRollback(struct AdbcConnection *connection, struct AdbcError *error)#
Roll back any pending transactions. Only used if autocommit is disabled.
Behavior is undefined if this is mixed with SQL transaction statements.
-
AdbcStatusCode AdbcStatementNew(struct AdbcConnection *connection, struct AdbcStatement *statement, struct AdbcError *error)#
Create a new statement for a given connection.
Callers pass in a zero-initialized AdbcStatement.
Drivers should allocate their internal data structure and set the private_data field to point to the newly allocated struct. This struct should be released when AdbcStatementRelease is called.
-
AdbcStatusCode AdbcStatementRelease(struct AdbcStatement *statement, struct AdbcError *error)#
Destroy a statement.
- Parameters:
statement – [in] The statement to release.
error – [out] An optional location to return an error message if necessary.
-
AdbcStatusCode AdbcStatementExecuteQuery(struct AdbcStatement *statement, struct ArrowArrayStream *out, int64_t *rows_affected, struct AdbcError *error)#
Execute a statement and get the results.
This invalidates any prior result sets.
- Parameters:
statement – [in] The statement to execute.
out – [out] The results. Pass NULL if the client does not expect a result set.
rows_affected – [out] The number of rows affected if known, else -1. Pass NULL if the client does not want this information.
error – [out] An optional location to return an error message if necessary.
-
AdbcStatusCode AdbcStatementPrepare(struct AdbcStatement *statement, struct AdbcError *error)#
Turn this statement into a prepared statement to be executed multiple times.
This invalidates any prior result sets.
-
AdbcStatusCode AdbcStatementSetSqlQuery(struct AdbcStatement *statement, const char *query, struct AdbcError *error)#
Set the SQL query to execute.
The query can then be executed with AdbcStatementExecute. For queries expected to be executed repeatedly, AdbcStatementPrepare the statement first.
- Parameters:
statement – [in] The statement.
query – [in] The query to execute.
error – [out] Error details, if an error occurs.
-
AdbcStatusCode AdbcStatementSetSubstraitPlan(struct AdbcStatement *statement, const uint8_t *plan, size_t length, struct AdbcError *error)#
Set the Substrait plan to execute.
The query can then be executed with AdbcStatementExecute. For queries expected to be executed repeatedly, AdbcStatementPrepare the statement first.
- Parameters:
statement – [in] The statement.
plan – [in] The serialized substrait.Plan to execute.
length – [in] The length of the serialized plan.
error – [out] Error details, if an error occurs.
-
AdbcStatusCode AdbcStatementBind(struct AdbcStatement *statement, struct ArrowArray *values, struct ArrowSchema *schema, struct AdbcError *error)#
Bind Arrow data. This can be used for bulk inserts or prepared statements.
- Parameters:
statement – [in] The statement to bind to.
values – [in] The values to bind. The driver will call the release callback itself, although it may not do this until the statement is released.
schema – [in] The schema of the values to bind.
error – [out] An optional location to return an error message if necessary.
-
AdbcStatusCode AdbcStatementBindStream(struct AdbcStatement *statement, struct ArrowArrayStream *stream, struct AdbcError *error)#
Bind Arrow data. This can be used for bulk inserts or prepared statements.
- Parameters:
statement – [in] The statement to bind to.
stream – [in] The values to bind. The driver will call the release callback itself, although it may not do this until the statement is released.
error – [out] An optional location to return an error message if necessary.
-
AdbcStatusCode AdbcStatementGetParameterSchema(struct AdbcStatement *statement, struct ArrowSchema *schema, struct AdbcError *error)#
Get the schema for bound parameters.
This retrieves an Arrow schema describing the number, names, and types of the parameters in a parameterized statement. The fields of the schema should be in order of the ordinal position of the parameters; named parameters should appear only once.
If the parameter does not have a name, or the name cannot be determined, the name of the corresponding field in the schema will be an empty string. If the type cannot be determined, the type of the corresponding field will be NA (NullType).
This should be called after AdbcStatementPrepare.
- Returns:
ADBC_STATUS_NOT_IMPLEMENTED if the schema cannot be determined.
-
AdbcStatusCode AdbcStatementSetOption(struct AdbcStatement *statement, const char *key, const char *value, struct AdbcError *error)#
Set a string option on a statement.
-
AdbcStatusCode AdbcStatementExecutePartitions(struct AdbcStatement *statement, struct ArrowSchema *schema, struct AdbcPartitions *partitions, int64_t *rows_affected, struct AdbcError *error)#
Execute a statement and get the results as a partitioned result set.
- Parameters:
statement – [in] The statement to execute.
schema – [out] The schema of the result set.
partitions – [out] The result partitions.
rows_affected – [out] The number of rows affected if known, else -1. Pass NULL if the client does not want this information.
error – [out] An optional location to return an error message if necessary.
- Returns:
ADBC_STATUS_NOT_IMPLEMENTED if the driver does not support partitioned results
-
struct AdbcError#
- #include <adbc.h>
A detailed error message for an operation.
-
struct AdbcDatabase#
- #include <adbc.h>
An instance of a database.
Must be kept alive as long as any connections exist.
Public Members
-
void *private_data#
Opaque implementation-defined state. This field is NULLPTR iff the connection is unintialized/freed.
-
struct AdbcDriver *private_driver#
The associated driver (used by the driver manager to help track state).
-
void *private_data#
-
struct AdbcConnection#
- #include <adbc.h>
An active database connection.
Provides methods for query execution, managing prepared statements, using transactions, and so on.
Connections are not required to be thread-safe, but they can be used from multiple threads so long as clients take care to serialize accesses to a connection.
Public Members
-
void *private_data#
Opaque implementation-defined state. This field is NULLPTR iff the connection is unintialized/freed.
-
struct AdbcDriver *private_driver#
The associated driver (used by the driver manager to help track state).
-
void *private_data#
-
struct AdbcStatement#
- #include <adbc.h>
A container for all state needed to execute a database query, such as the query itself, parameters for prepared statements, driver parameters, etc.
Statements may represent queries or prepared statements.
Statements may be used multiple times and can be reconfigured (e.g. they can be reused to execute multiple different queries). However, executing a statement (and changing certain other state) will invalidate result sets obtained prior to that execution.
Multiple statements may be created from a single connection. However, the driver may block or error if they are used concurrently (whether from a single thread or multiple threads).
Statements are not required to be thread-safe, but they can be used from multiple threads so long as clients take care to serialize accesses to a statement.
Public Members
-
void *private_data#
Opaque implementation-defined state. This field is NULLPTR iff the connection is unintialized/freed.
-
struct AdbcDriver *private_driver#
The associated driver (used by the driver manager to help track state).
-
void *private_data#
-
struct AdbcPartitions#
- #include <adbc.h>
The partitions of a distributed/partitioned result set.
Public Members
-
size_t num_partitions#
The number of partitions.
-
const uint8_t **partitions#
The partitions of the result set, where each entry (up to num_partitions entries) is an opaque identifier that can be passed to AdbcConnectionReadPartition.
-
const size_t *partition_lengths#
The length of each corresponding entry in partitions.
-
void *private_data#
Opaque implementation-defined state. This field is NULLPTR iff the connection is unintialized/freed.
-
void (*release)(struct AdbcPartitions *partitions)#
Release the contained partitions.
Unlike other structures, this is an embedded callback to make it easier for the driver manager and driver to cooperate.
-
size_t num_partitions#
-
struct AdbcDriver#
- #include <adbc.h>
An instance of an initialized database driver.
This provides a common interface for vendor-specific driver initialization routines. Drivers should populate this struct, and applications can call ADBC functions through this struct, without worrying about multiple definitions of the same symbol.
Public Members
-
void *private_data#
Opaque driver-defined state. This field is NULL if the driver is unintialized/freed (but it need not have a value even if the driver is initialized).
-
void *private_manager#
Opaque driver manager-defined state. This field is NULL if the driver is unintialized/freed (but it need not have a value even if the driver is initialized).
-
AdbcStatusCode (*release)(struct AdbcDriver *driver, struct AdbcError *error)#
Release the driver and perform any cleanup.
This is an embedded callback to make it easier for the driver manager and driver to cooperate.
-
AdbcStatusCode (*DatabaseInit)(struct AdbcDatabase*, struct AdbcError*)#
-
AdbcStatusCode (*DatabaseNew)(struct AdbcDatabase*, struct AdbcError*)#
-
AdbcStatusCode (*DatabaseSetOption)(struct AdbcDatabase*, const char*, const char*, struct AdbcError*)#
-
AdbcStatusCode (*DatabaseRelease)(struct AdbcDatabase*, struct AdbcError*)#
-
AdbcStatusCode (*ConnectionCommit)(struct AdbcConnection*, struct AdbcError*)#
-
AdbcStatusCode (*ConnectionGetInfo)(struct AdbcConnection*, uint32_t*, size_t, struct ArrowArrayStream*, struct AdbcError*)#
-
AdbcStatusCode (*ConnectionGetObjects)(struct AdbcConnection*, int, const char*, const char*, const char*, const char**, const char*, struct ArrowArrayStream*, struct AdbcError*)#
-
AdbcStatusCode (*ConnectionGetTableSchema)(struct AdbcConnection*, const char*, const char*, const char*, struct ArrowSchema*, struct AdbcError*)#
-
AdbcStatusCode (*ConnectionGetTableTypes)(struct AdbcConnection*, struct ArrowArrayStream*, struct AdbcError*)#
-
AdbcStatusCode (*ConnectionInit)(struct AdbcConnection*, struct AdbcDatabase*, struct AdbcError*)#
-
AdbcStatusCode (*ConnectionNew)(struct AdbcConnection*, struct AdbcError*)#
-
AdbcStatusCode (*ConnectionSetOption)(struct AdbcConnection*, const char*, const char*, struct AdbcError*)#
-
AdbcStatusCode (*ConnectionReadPartition)(struct AdbcConnection*, const uint8_t*, size_t, struct ArrowArrayStream*, struct AdbcError*)#
-
AdbcStatusCode (*ConnectionRelease)(struct AdbcConnection*, struct AdbcError*)#
-
AdbcStatusCode (*ConnectionRollback)(struct AdbcConnection*, struct AdbcError*)#
-
AdbcStatusCode (*StatementBind)(struct AdbcStatement*, struct ArrowArray*, struct ArrowSchema*, struct AdbcError*)#
-
AdbcStatusCode (*StatementBindStream)(struct AdbcStatement*, struct ArrowArrayStream*, struct AdbcError*)#
-
AdbcStatusCode (*StatementExecuteQuery)(struct AdbcStatement*, struct ArrowArrayStream*, int64_t*, struct AdbcError*)#
-
AdbcStatusCode (*StatementExecutePartitions)(struct AdbcStatement*, struct ArrowSchema*, struct AdbcPartitions*, int64_t*, struct AdbcError*)#
-
AdbcStatusCode (*StatementGetParameterSchema)(struct AdbcStatement*, struct ArrowSchema*, struct AdbcError*)#
-
AdbcStatusCode (*StatementNew)(struct AdbcConnection*, struct AdbcStatement*, struct AdbcError*)#
-
AdbcStatusCode (*StatementPrepare)(struct AdbcStatement*, struct AdbcError*)#
-
AdbcStatusCode (*StatementRelease)(struct AdbcStatement*, struct AdbcError*)#
-
AdbcStatusCode (*StatementSetOption)(struct AdbcStatement*, const char*, const char*, struct AdbcError*)#
-
AdbcStatusCode (*StatementSetSqlQuery)(struct AdbcStatement*, const char*, struct AdbcError*)#
-
AdbcStatusCode (*StatementSetSubstraitPlan)(struct AdbcStatement*, const uint8_t*, size_t, struct AdbcError*)#
-
void *private_data#