postgresql/factory.cpp
Go to the documentation of this file.
1 //
2 // Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
6 //
7 
8 #define SOCI_POSTGRESQL_SOURCE
9 #include "soci-postgresql.h"
10 #include <backend-loader.h>
11 #include <libpq/libpq-fs.h> // libpq
12 
13 #ifdef SOCI_POSTGRESQL_NOPARAMS
14 #ifndef SOCI_POSTGRESQL_NOBINDBYNAME
15 #define SOCI_POSTGRESQL_NOBINDBYNAME
16 #endif // SOCI_POSTGRESQL_NOBINDBYNAME
17 #endif // SOCI_POSTGRESQL_NOPARAMS
18 
19 #ifdef _MSC_VER
20 #pragma warning(disable:4355)
21 #endif
22 
23 using namespace soci;
24 using namespace soci::details;
25 
26 // concrete factory for Empty concrete strategies
28  connection_parameters const & parameters) const
29 {
30  return new postgresql_session_backend(parameters);
31 }
32 
34 
35 extern "C"
36 {
37 
38 // for dynamic backend loading
40 {
41  return &soci::postgresql;
42 }
43 
45 {
46  soci::dynamic_backends::register_backend("postgresql", soci::postgresql);
47 }
48 
49 } // extern "C"
#define SOCI_POSTGRESQL_DECL
SOCI_DECL void register_backend(std::string const &name, std::string const &shared_object=std::string())
virtual postgresql_session_backend * make_session(connection_parameters const &parameters) const
SOCI_POSTGRESQL_DECL void register_factory_postgresql()
SOCI_POSTGRESQL_DECL backend_factory const * factory_postgresql()
std::vector< ISM::CombinatorialTrainerParameters > parameters
SOCI_POSTGRESQL_DECL postgresql_backend_factory const postgresql


asr_lib_ism
Author(s): Hanselmann Fabian, Heller Florian, Heizmann Heinrich, Kübler Marcel, Mehlhaus Jonas, Meißner Pascal, Qattan Mohamad, Reckling Reno, Stroh Daniel
autogenerated on Wed Jan 8 2020 04:02:40