25 #include <mysql/mysql.h>
26 #include <boost/scoped_array.hpp>
27 #include <boost/scoped_ptr.hpp>
76 Connection(
const char* host,
const char* user,
const char* passwd,
const char* db,
unsigned int port,
const char* unix_socket,
unsigned long client_flag,
const char*
const charset=
"latin1",
const int threads_=1):
ConnectionPar<MySQL::
Statement>(threads_),
m_initialized(false)
78 connect(host, user, passwd, db, port, unix_socket, client_flag, charset);
107 void connect(
const char* host,
const char* user,
const char* passwd,
const char* db,
unsigned int port,
const char* unix_socket,
unsigned long client_flag,
const char*
const charset=
"latin1");
114 void getFoundRows(
unsigned long long*
const& rows,
const unsigned int id);
159 stmt(new MYSQL_STMT*[connection_.threads()]),
161 paramsBindings(new boost::scoped_array<MYSQL_BIND>[connection_.threads()]),
162 resultsBindings(new boost::scoped_array<MYSQL_BIND>[connection_.threads()]),
163 m_stop(new const bool*[connection_.threads()])
165 init(queryString, queryLength, parameterSet, resultSet);
175 stmt(new MYSQL_STMT*[connection_.threads()]),
177 paramsBindings(new boost::scoped_array<MYSQL_BIND>[connection_.threads()]),
178 resultsBindings(new boost::scoped_array<MYSQL_BIND>[connection_.threads()]),
179 m_stop(new const bool*[connection_.threads()]) {}
208 void init(
const char*
const& queryString,
const size_t& queryLength,
const Data::Set*
const parameterSet,
const Data::Set*
const resultSet,
bool customPlaceholders=
false);
235 void execute(
const Data::Set*
const parameters,
Data::SetContainer*
const results,
unsigned long long int*
const insertId=0,
unsigned long long int*
const rows=0,
bool docommit=
true,
const unsigned int thread=0);
275 void execute(
const Data::SetContainer& parameters,
unsigned long long int* rows=0,
bool docommit=
true,
const unsigned int thread=0);
299 boost::scoped_array<MYSQL_STMT*>
stmt;
488 Error(MYSQL_STMT* stmt);