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

0001 //
0002 // Copyright (C) 2011-2013 Denis Chapligin
0003 // Copyright (C) 2004-2006 Maciej Sobczak, Stephen Hutton, David Courtney
0004 // Distributed under the Boost Software License, Version 1.0.
0005 // (See accompanying file LICENSE_1_0.txt or copy at
0006 // http://www.boost.org/LICENSE_1_0.txt)
0007 //
0008 
0009 #define SOCI_DB2_SOURCE
0010 #include "soci/db2/soci-db2.h"
0011 #include "soci/backend-loader.h"
0012 
0013 using namespace soci;
0014 using namespace soci::details;
0015 
0016 
0017 // concrete factory for ODBC concrete strategies
0018 db2_session_backend * db2_backend_factory::make_session(
0019      connection_parameters const & parameters) const
0020 {
0021      return new db2_session_backend(parameters);
0022 }
0023 
0024 db2_backend_factory const soci::db2;
0025 
0026 extern "C"
0027 {
0028 
0029 // for dynamic backend loading
0030 SOCI_DB2_DECL backend_factory const * factory_db2()
0031 {
0032     return &soci::db2;
0033 }
0034 
0035 SOCI_DB2_DECL void register_factory_db2()
0036 {
0037     soci::dynamic_backends::register_backend("db2", soci::db2);
0038 }
0039 
0040 } // extern "C"