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/Table.h"
12#include "rdbModel/Tables/Column.h"
21 : m_readCxt(0), m_writeCxt(0),
22 m_host(host), m_table(table), m_dbName(dbName), m_userName(
"maqm"), m_password(
"12345"), m_man(0), m_rdb(0),
29 : m_readCxt(0), m_writeCxt(0),
30 m_host(host), m_dbName(dbName), m_userName(userName), m_password(password),
31 m_man(0), m_rdb(0), m_match(
false) {
37 if (m_man)
delete m_man;
44 const std::string& user,
45 const std::string& pw, eRet& err,
46 const std::string& dbName) {
49 bool connected = cxt->
open(host, user, pw, dbName);
64 bool ok = connect(m_readCxt, m_host, m_userName,
65 m_password, err, m_dbName);
76 bool ConnectionDBBase::connectWrite(eRet& err) {
77 if (m_writeCxt == 0) {
81 ok = connect(m_writeCxt, m_host, m_userName,
82 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