ADBC
Arrow Database Connectivity
Loading...
Searching...
No Matches
adbc_driver_manager.h
Go to the documentation of this file.
1// Licensed to the Apache Software Foundation (ASF) under one
2// or more contributor license agreements. See the NOTICE file
3// distributed with this work for additional information
4// regarding copyright ownership. The ASF licenses this file
5// to you under the Apache License, Version 2.0 (the
6// "License"); you may not use this file except in compliance
7// with the License. You may obtain a copy of the License at
8//
9// http://www.apache.org/licenses/LICENSE-2.0
10//
11// Unless required by applicable law or agreed to in writing,
12// software distributed under the License is distributed on an
13// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14// KIND, either express or implied. See the License for the
15// specific language governing permissions and limitations
16// under the License.
17
22
23#pragma once
24
25#include <arrow-adbc/adbc.h>
26#include <stdint.h>
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
32#ifndef ADBC_DRIVER_MANAGER_H
33#define ADBC_DRIVER_MANAGER_H
34
35typedef uint32_t AdbcLoadFlags;
36
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
41
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)
45
62ADBC_EXPORT
63AdbcStatusCode AdbcLoadDriver(const char* driver_name, const char* entrypoint,
64 int version, void* driver, struct AdbcError* error);
65
107ADBC_EXPORT
108AdbcStatusCode AdbcFindLoadDriver(const char* driver_name, const char* entrypoint,
109 const int version, const AdbcLoadFlags load_options,
110 void* driver, struct AdbcError* error);
111
124ADBC_EXPORT
126 void* driver, struct AdbcError* error);
127
135ADBC_EXPORT
137 AdbcDriverInitFunc init_func,
138 struct AdbcError* error);
139
150ADBC_EXPORT
152 AdbcLoadFlags flags,
153 struct AdbcError* error);
154
156ADBC_EXPORT
158
159#endif // ADBC_DRIVER_MANAGER_H
160
161#ifdef __cplusplus
162}
163#endif
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, 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.
An instance of a database.
Definition adbc.h:860
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:2399
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