/src/gdal/gcore/gdal_adbc.cpp
Line | Count | Source |
1 | | /****************************************************************************** |
2 | | * Name: gdal_adbc.h |
3 | | * Project: GDAL Core |
4 | | * Purpose: GDAL Core ADBC related declarations. |
5 | | * Author: Even Rouault <even dot rouault at spatialys.com> |
6 | | * |
7 | | ****************************************************************************** |
8 | | * Copyright (c) 2024, Even Rouault <even dot rouault at spatialys.com> |
9 | | * Copyright (c) 2024, Dewey Dunnington <dewey@voltrondata.com> |
10 | | * |
11 | | * SPDX-License-Identifier: MIT |
12 | | ****************************************************************************/ |
13 | | |
14 | | #include "cpl_port.h" |
15 | | #include "gdal_adbc.h" |
16 | | |
17 | | //! ADBC driver initialization function |
18 | | static GDALAdbcLoadDriverFunc GDALAdbcLoadDriver = nullptr; |
19 | | |
20 | | /************************************************************************/ |
21 | | /* GDALSetAdbcLoadDriverOverride() */ |
22 | | /************************************************************************/ |
23 | | |
24 | | /** When set, it is used by the OGR ADBC driver to populate AdbcDriver |
25 | | * callbacks. This provides an embedding application the opportunity to |
26 | | * locate an up-to-date version of a driver or to bundle a driver not |
27 | | * available at the system level. |
28 | | * |
29 | | * Setting it to NULL resets to the the default behavior of the ADBC driver, |
30 | | * which is use AdbcLoadDriver() from arrow-adbc/adbc_driver_manager.h or |
31 | | * to error if the OGR ADBC driver was not built against a system driver |
32 | | * manager. |
33 | | */ |
34 | | void GDALSetAdbcLoadDriverOverride(GDALAdbcLoadDriverFunc init_func) |
35 | 0 | { |
36 | 0 | GDALAdbcLoadDriver = init_func; |
37 | 0 | } |
38 | | |
39 | | /************************************************************************/ |
40 | | /* GDALGetAdbcLoadDriverOverride() */ |
41 | | /************************************************************************/ |
42 | | |
43 | | /** Gets the ADBC driver load function. This will be NULL if an explicit |
44 | | * override was not specified. |
45 | | */ |
46 | | GDALAdbcLoadDriverFunc GDALGetAdbcLoadDriverOverride() |
47 | 3 | { |
48 | 3 | return GDALAdbcLoadDriver; |
49 | 3 | } |