1#include "ReadDBBase/ConnectionDBBase.h"
2#include "facilities/Util.h"
3#include "rdbModel/Management/Manager.h"
4#include "rdbModel/Management/XercesBuilder.h"
6#include "rdbModel/Db/MysqlConnection.h"
7#include "rdbModel/Db/MysqlResults.h"
8#include "rdbModel/Rdb.h"
9#include "rdbModel/RdbException.h"
10#include "rdbModel/Tables/Assertion.h"
11#include "rdbModel/Tables/Column.h"
12#include "rdbModel/Tables/Table.h"
19 const std::string& dbName )
25 , m_userName(
"maqm" )
26 , m_password(
"12345" )
34 const std::string& userName,
const std::string& password )
39 , m_userName( userName )
40 , m_password( password )
48 if ( m_man )
delete m_man;
53 const std::string& user,
const std::string& pw, eRet& err,
54 const std::string& dbName ) {
56 bool connected = cxt->
open( host, user, pw, dbName );
74 bool ok = connect( m_readCxt, m_host, m_userName, m_password, err, m_dbName );
86bool ConnectionDBBase::connectWrite( eRet& err ) {
87 if ( m_writeCxt == 0 )
92 ok = connect( m_writeCxt, m_host, m_userName, m_password, err, m_dbName );
bool connectRead(eRet &err)
ConnectionDBBase(const std::string &host, const std::string &table, const std::string &dbName)
Constructor keeps track of table of interest.
virtual bool open(const std::string &host, const std::string &userid, const std::string &password, const std::string &dbName)=0