LCOV - code coverage report
Current view: top level - gcore - gdal_adbc.cpp (source / functions) Hit Total Coverage
Test: gdal_filtered.info Lines: 2 5 40.0 %
Date: 2024-11-21 22:18:42 Functions: 1 2 50.0 %

          Line data    Source code
       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           0 : void GDALSetAdbcLoadDriverOverride(GDALAdbcLoadDriverFunc init_func)
      35             : {
      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          39 : GDALAdbcLoadDriverFunc GDALGetAdbcLoadDriverOverride()
      47             : {
      48          39 :     return GDALAdbcLoadDriver;
      49             : }

Generated by: LCOV version 1.14