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