LCOV - code coverage report
Current view: top level - ogr/ogrsf_frmts/sqlite - my_test_sqlite3_ext.c (source / functions) Hit Total Coverage
Test: gdal_filtered.info Lines: 6 6 100.0 %
Date: 2024-11-25 13:07:18 Functions: 2 2 100.0 %

          Line data    Source code
       1             : #include "cpl_port.h"
       2             : 
       3             : #include <sqlite3ext.h>
       4             : 
       5             : SQLITE_EXTENSION_INIT1
       6             : 
       7           2 : static void myext(sqlite3_context *pContext, int argc, sqlite3_value **argv)
       8             : {
       9             :     (void)argc;
      10             :     (void)argv;
      11           2 :     sqlite3_result_text(pContext, "this works!", -1, SQLITE_TRANSIENT);
      12           2 : }
      13             : 
      14             : int CPL_DLL sqlite3_extension_init(sqlite3 *db, char **pzErrMsg,
      15             :                                    const sqlite3_api_routines *pApi);
      16             : 
      17           2 : int sqlite3_extension_init(sqlite3 *db, char **pzErrMsg,
      18             :                            const sqlite3_api_routines *pApi)
      19             : {
      20           2 :     SQLITE_EXTENSION_INIT2(pApi);
      21             :     (void)pzErrMsg;
      22           2 :     return sqlite3_create_function(db, "myext", 0, SQLITE_ANY, 0, myext, 0, 0);
      23             : }

Generated by: LCOV version 1.14