mysql/factory.cpp
Go to the documentation of this file.
1 //
2 // Copyright (C) 2004-2006 Maciej Sobczak, Stephen Hutton
3 // MySQL backend copyright (C) 2006 Pawel Aleksander Fedorynski
4 // Distributed under the Boost Software License, Version 1.0.
5 // (See accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt)
7 //
8 
9 #define SOCI_MYSQL_SOURCE
10 #include "soci-mysql.h"
11 #include <backend-loader.h>
12 #include <ciso646>
13 
14 #ifdef _MSC_VER
15 #pragma warning(disable:4355)
16 #endif
17 
18 using namespace soci;
19 using namespace soci::details;
20 
21 
22 // concrete factory for MySQL concrete strategies
24  connection_parameters const & parameters) const
25 {
26  return new mysql_session_backend(parameters);
27 }
28 
30 
31 extern "C"
32 {
33 
34 // for dynamic backend loading
36 {
37  return &soci::mysql;
38 }
39 
41 {
42  soci::dynamic_backends::register_backend("mysql", soci::mysql);
43 }
44 
45 } // extern "C"
SOCI_DECL void register_backend(std::string const &name, std::string const &shared_object=std::string())
SOCI_MYSQL_DECL backend_factory const * factory_mysql()
#define SOCI_MYSQL_DECL
Definition: soci-mysql.h:24
SOCI_MYSQL_DECL mysql_backend_factory const mysql
SOCI_MYSQL_DECL void register_factory_mysql()
std::vector< ISM::CombinatorialTrainerParameters > parameters
virtual mysql_session_backend * make_session(connection_parameters const &parameters) const


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