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

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_ODBC_SOURCE
0009 #include "soci/odbc/soci-odbc.h"
0010 #include "soci/backend-loader.h"
0011 
0012 using namespace soci;
0013 using namespace soci::details;
0014 
0015 
0016 // concrete factory for ODBC concrete strategies
0017 odbc_session_backend * odbc_backend_factory::make_session(
0018      connection_parameters const & parameters) const
0019 {
0020      return new odbc_session_backend(parameters);
0021 }
0022 
0023 odbc_backend_factory const soci::odbc;
0024 
0025 extern "C"
0026 {
0027 
0028 // for dynamic backend loading
0029 SOCI_ODBC_DECL backend_factory const * factory_odbc()
0030 {
0031     return &soci::odbc;
0032 }
0033 
0034 SOCI_ODBC_DECL void register_factory_odbc()
0035 {
0036     soci::dynamic_backends::register_backend("odbc", soci::odbc);
0037 }
0038 
0039 } // extern "C"