LCOV - code coverage report
Current view: top level - ogr/ogrsf_frmts/adbc - ogradbcdriver.cpp (source / functions) Hit Total Coverage
Test: gdal_filtered.info Lines: 7 16 43.8 %
Date: 2024-11-21 22:18:42 Functions: 1 2 50.0 %

          Line data    Source code
       1             : /******************************************************************************
       2             :  *
       3             :  * Project:  GDAL
       4             :  * Purpose:  Arrow Database Connectivity driver
       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             :  *
      10             :  * SPDX-License-Identifier: MIT
      11             :  ****************************************************************************/
      12             : 
      13             : #include "ogr_adbc.h"
      14             : #include "ogradbcdrivercore.h"
      15             : 
      16             : /************************************************************************/
      17             : /*                         OGRADBCDriverOpen()                          */
      18             : /************************************************************************/
      19             : 
      20           0 : static GDALDataset *OGRADBCDriverOpen(GDALOpenInfo *poOpenInfo)
      21             : {
      22           0 :     if (!OGRADBCDriverIdentify(poOpenInfo))
      23           0 :         return nullptr;
      24           0 :     auto poDS = std::make_unique<OGRADBCDataset>();
      25           0 :     if (!poDS->Open(poOpenInfo))
      26           0 :         return nullptr;
      27           0 :     return poDS.release();
      28             : }
      29             : 
      30             : /************************************************************************/
      31             : /*                          RegisterOGRADBC()                           */
      32             : /************************************************************************/
      33             : 
      34           9 : void RegisterOGRADBC()
      35             : {
      36           9 :     if (!GDAL_CHECK_VERSION(DRIVER_NAME))
      37           0 :         return;
      38             : 
      39           9 :     if (GDALGetDriverByName(DRIVER_NAME) != nullptr)
      40           0 :         return;
      41             : 
      42           9 :     GDALDriver *poDriver = new GDALDriver();
      43           9 :     OGRADBCDriverSetCommonMetadata(poDriver);
      44           9 :     poDriver->pfnOpen = OGRADBCDriverOpen;
      45           9 :     GetGDALDriverManager()->RegisterDriver(poDriver);
      46             : }

Generated by: LCOV version 1.14