File indexing completed on 2025-02-23 05:15:21

0001 //
0002 // Copyright (C) 2004-2006 Maciej Sobczak, Stephen Hutton, David Courtney
0003 // Distributed under the Boost Software License, Version 1.0.
0004 // (See accompanying file LICENSE_1_0.txt or copy at
0005 // http://www.boost.org/LICENSE_1_0.txt)
0006 //
0007 
0008 #define SOCI_SQLITE3_SOURCE
0009 #include "soci/sqlite3/soci-sqlite3.h"
0010 #include "soci/backend-loader.h"
0011 
0012 #ifdef _MSC_VER
0013 #pragma warning(disable:4355)
0014 #endif
0015 
0016 using namespace soci;
0017 using namespace soci::details;
0018 
0019 // concrete factory for Empty concrete strategies
0020 sqlite3_session_backend * sqlite3_backend_factory::make_session(
0021      connection_parameters const & parameters) const
0022 {
0023      return new sqlite3_session_backend(parameters);
0024 }
0025 
0026 sqlite3_backend_factory const soci::sqlite3;
0027 
0028 extern "C"
0029 {
0030 
0031 // for dynamic backend loading
0032 SOCI_SQLITE3_DECL backend_factory const * factory_sqlite3()
0033 {
0034     return &soci::sqlite3;
0035 }
0036 
0037 SOCI_SQLITE3_DECL void register_factory_sqlite3()
0038 {
0039     soci::dynamic_backends::register_backend("sqlite3", soci::sqlite3);
0040 }
0041 
0042 } // extern "C"