1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
//
// Copyright (C) 2011-2013 Denis Chapligin
// Copyright (C) 2004-2006 Maciej Sobczak, Stephen Hutton, David Courtney
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt)
//
#define SOCI_DB2_SOURCE
#include "soci/db2/soci-db2.h"
#include "soci/backend-loader.h"
using namespace soci;
using namespace soci::details;
// concrete factory for ODBC concrete strategies
db2_session_backend * db2_backend_factory::make_session(
connection_parameters const & parameters) const
{
return new db2_session_backend(parameters);
}
db2_backend_factory const soci::db2;
extern "C"
{
// for dynamic backend loading
SOCI_DB2_DECL backend_factory const * factory_db2()
{
return &soci::db2;
}
SOCI_DB2_DECL void register_factory_db2()
{
soci::dynamic_backends::register_backend("db2", soci::db2);
}
} // extern "C"
|