File indexing completed on 2025-02-23 05:15:16
0001 // 0002 // Copyright (C) 2004-2006 Maciej Sobczak, Stephen Hutton 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_EMPTY_SOURCE 0009 #include "soci/empty/soci-empty.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 empty_session_backend* empty_backend_factory::make_session( 0021 connection_parameters const& parameters) const 0022 { 0023 return new empty_session_backend(parameters); 0024 } 0025 0026 empty_backend_factory const soci::empty; 0027 0028 extern "C" 0029 { 0030 0031 // for dynamic backend loading 0032 SOCI_EMPTY_DECL backend_factory const* factory_empty() 0033 { 0034 return &soci::empty; 0035 } 0036 0037 SOCI_EMPTY_DECL void register_factory_empty() 0038 { 0039 soci::dynamic_backends::register_backend("empty", soci::empty); 0040 } 0041 0042 } // extern "C"