Driver Manager#

The driver manager is a library that implements the ADBC API by delegating to dynamically-loaded drivers. This allows applications to use multiple drivers simultaneously, and decouple themselves from the specific driver.

Installation#

TODO

Usage#

To create a database, use the AdbcDatabase API as usual, but during initialization, provide two additional parameters in addition to the driver-specific connection parameters: driver and (optionally) entrypoint. driver must be the name of a library to load, or the path to a library to load. entrypoint, if provided, should be the name of the symbol that serves as the ADBC entrypoint (see AdbcDriverInitFunc).

/* Ignoring error handling */
struct AdbcDatabase database;
memset(&database, 0, sizeof(database));
AdbcDatabaseNew(&database, NULL);
/* On Linux: loads libadbc_driver_sqlite.so
 * On MacOS: loads libadbc_driver_sqlite.dylib
 * On Windows: loads adbc_driver_sqlite.dll */
AdbcDatabaseSetOption(&database, "driver", "adbc_driver_sqlite", NULL);
/* Set additional options for the specific driver, if needed */
/* Initialize the database */
AdbcDatabaseInit(&database, NULL);
/* Create connections as usual */

API Reference#

The driver manager includes a few additional functions beyond the ADBC API. See the API reference: adbc_driver_manager.h.