32#ifndef ADBC_DRIVER_MANAGER_H
33#define ADBC_DRIVER_MANAGER_H
35typedef uint32_t AdbcLoadFlags;
37#define ADBC_LOAD_FLAG_SEARCH_ENV 1
38#define ADBC_LOAD_FLAG_SEARCH_USER 2
39#define ADBC_LOAD_FLAG_SEARCH_SYSTEM 4
40#define ADBC_LOAD_FLAG_ALLOW_RELATIVE_PATHS 8
42#define ADBC_LOAD_FLAG_DEFAULT \
43 (ADBC_LOAD_FLAG_SEARCH_ENV | ADBC_LOAD_FLAG_SEARCH_USER | \
44 ADBC_LOAD_FLAG_SEARCH_SYSTEM | ADBC_LOAD_FLAG_ALLOW_RELATIVE_PATHS)
64 int version,
void* driver,
struct AdbcError* error);
110 const int version,
const AdbcLoadFlags load_options,
111 const char* additional_search_path_list,
void* driver,
248 const char*** values,
size_t* num_options,
268 const char*** keys,
const int64_t** values,
269 size_t* num_options,
struct AdbcError* error);
289 const char*** keys,
const double** values,
290 size_t* num_options,
struct AdbcError* error);
303 const char* profile_name,
const char* additional_search_path_list,
352 const char* additional_search_path_list,
AdbcStatusCode AdbcDriverManagerDatabaseSetLoadFlags(struct AdbcDatabase *database, AdbcLoadFlags flags, struct AdbcError *error)
Set the load flags for the driver manager.
const char * AdbcStatusCodeMessage(AdbcStatusCode code)
Get a human-friendly description of a status code.
AdbcStatusCode AdbcFindLoadDriver(const char *driver_name, const char *entrypoint, const int version, const AdbcLoadFlags load_options, const char *additional_search_path_list, void *driver, struct AdbcError *error)
Common entry point to search for and load a driver or manifest.
AdbcStatusCode AdbcLoadDriverFromInitFunc(AdbcDriverInitFunc init_func, int version, void *driver, struct AdbcError *error)
Common entry point for drivers via the driver manager.
AdbcStatusCode AdbcLoadDriver(const char *driver_name, const char *entrypoint, int version, void *driver, struct AdbcError *error)
Common entry point for drivers via the driver manager.
AdbcStatusCode AdbcDriverManagerDatabaseSetInitFunc(struct AdbcDatabase *database, AdbcDriverInitFunc init_func, struct AdbcError *error)
Set the AdbcDriverInitFunc to use.
AdbcStatusCode AdbcDriverManagerDatabaseSetAdditionalSearchPathList(struct AdbcDatabase *database, const char *path_list, struct AdbcError *error)
Set an additional manifest search path list for the driver manager.
An instance of a database.
Definition adbc.h:860
AdbcStatusCode(* GetOptions)(struct AdbcConnectionProfile *profile, const char ***keys, const char ***values, size_t *num_options, struct AdbcError *error)
Get the string options specified by the profile.
Definition adbc_driver_manager.h:247
void(* release)(struct AdbcConnectionProfile *profile)
Release the profile and perform any cleanup.
Definition adbc_driver_manager.h:211
AdbcStatusCode(* GetIntOptions)(struct AdbcConnectionProfile *profile, const char ***keys, const int64_t **values, size_t *num_options, struct AdbcError *error)
Get the integer options specified by the profile.
Definition adbc_driver_manager.h:267
void * private_data
Opaque implementation-defined state. This field is NULL if the profile is uninitialized/freed (but it...
Definition adbc_driver_manager.h:208
AdbcStatusCode(* GetDoubleOptions)(struct AdbcConnectionProfile *profile, const char ***keys, const double **values, size_t *num_options, struct AdbcError *error)
Get the double options specified by the profile.
Definition adbc_driver_manager.h:288
AdbcStatusCode(* GetDriverName)(struct AdbcConnectionProfile *profile, const char **driver_name, AdbcDriverInitFunc *init_func, struct AdbcError *error)
Get the driver to use as specified by this profile.
Definition adbc_driver_manager.h:225
AdbcStatusCode AdbcProfileProviderFilesystem(const char *profile_name, const char *additional_search_path_list, struct AdbcConnectionProfile *out, struct AdbcError *error)
Default Filesystem-based profile provider for the driver manager.
AdbcStatusCode AdbcDriverManagerDatabaseSetProfileProvider(struct AdbcDatabase *database, AdbcConnectionProfileProvider provider, struct AdbcError *error)
Set a custom connection profile provider for the driver manager.
AdbcStatusCode(* AdbcConnectionProfileProvider)(const char *profile_name, const char *additional_search_path_list, struct AdbcConnectionProfile *out, struct AdbcError *error)
Common definition for a connection profile provider.
Definition adbc_driver_manager.h:302
Abstract interface for connection profile providers.
Definition adbc_driver_manager.h:204
AdbcStatusCode(* AdbcDriverInitFunc)(int version, void *driver, struct AdbcError *error)
Common entry point for drivers via the driver manager (which uses dlopen(3)/LoadLibrary)....
Definition adbc.h:2404
uint8_t AdbcStatusCode
Error codes for operations that may fail.
Definition adbc.h:176
A detailed error message for an operation.
Definition adbc.h:283