Create a new statement for executing queries.
A Promise resolving to a new AdbcStatement.
Set an option on the connection.
The option name (e.g., "adbc.connection.autocommit").
The option value.
Toggle autocommit behavior.
Whether autocommit should be enabled.
Toggle read-only mode.
Whether the connection should be read-only.
Get a hierarchical view of database objects (catalogs, schemas, tables, columns).
Optionaloptions: GetObjectsOptionsFiltering options for the metadata query.
A Promise resolving to an Apache Arrow Table containing the metadata.
Get the Arrow schema for a specific table.
An object containing catalog, dbSchema, and tableName.
Optionalcatalog?: stringThe catalog name (or undefined).
OptionaldbSchema?: stringThe schema name (or undefined).
The table name.
A Promise resolving to the Arrow Schema of the table.
Get a list of table types supported by the database.
A Promise resolving to an Apache Arrow Table with a single string column of table types.
Get metadata about the driver and database.
A Promise resolving to an Apache Arrow Table containing the requested metadata info.
Execute a SQL query and return all results as an Arrow Table.
Convenience method that creates a statement, sets the SQL, optionally binds parameters, executes the query, and closes the statement. For large result sets, use queryStream to avoid loading everything into memory.
The SQL query to execute.
Optionalparams: Table<any>Optional Arrow Table to bind as parameters.
A Promise resolving to an Apache Arrow Table.
Execute a SQL query and return the results as a RecordBatchReader for streaming.
Use this instead of query when working with large result sets that should not be fully loaded into memory. The reader remains valid after the statement is closed because the underlying iterator holds its own reference to the native resources.
The SQL query to execute.
Optionalparams: Table<any>Optional Arrow Table to bind as parameters.
A Promise resolving to an Apache Arrow RecordBatchReader.
Ingest Arrow data into a database table.
Convenience method that sets the ingestion options, binds the data, and calls executeUpdate. Depending on the driver, this can avoid per-row overhead compared to a prepare-bind-insert loop.
The target table name.
Arrow Table to ingest.
Optionaloptions: IngestOptionsIngestion options (mode, catalog, dbSchema, temporary).
A Promise resolving to the number of rows ingested, or -1 if unknown.
Ingest Arrow data from a stream into a database table.
Unlike ingest, this method streams data batch-by-batch, avoiding full materialization in memory. Use this for large datasets that should not be buffered entirely.
The target table name.
Arrow RecordBatchReader to stream.
Optionaloptions: IngestOptionsIngestion options (mode, catalog, dbSchema, temporary).
A Promise resolving to the number of rows ingested, or -1 if unknown.
Execute a SQL statement (INSERT, UPDATE, DELETE, DDL) and return the row count.
Convenience method that creates a statement, sets the SQL, optionally binds parameters, executes the update, and closes the statement.
The SQL statement to execute.
Optionalparams: Table<any>Optional Arrow Table to bind as parameters.
A Promise resolving to the number of rows affected, or -1 if unknown.
Commit any pending transactions. Only valid if autocommit is disabled.
Rollback any pending transactions. Only valid if autocommit is disabled.
Close the connection and release resources.
Represents a single connection to a database.
An AdbcConnection maintains the state of a connection to the database, such as current transaction state and session options.