2#ifndef RDBMODEL_MYSQLCONNECTION_H
3#define RDBMODEL_MYSQLCONNECTION_H
5#include "rdbModel/Db/Connection.h"
6#include "rdbModel/Tables/Assertion.h"
7#include "rdbModel/Management/Visitor.h"
40 virtual bool open(
const std::string& host,
const std::string& userid,
41 const std::string& password,
42 const std::string& dbName);
47 virtual bool open(
const std::string& parms);
56 std::ostream*
getOut()
const {
return m_out;}
80 virtual bool insertRow(
const std::string& tableName,
89 virtual unsigned int update(
const std::string& tableName,
166 std::string m_dbName;
173 VISITOR m_visitorType;
184 std::vector<Column* > m_ourCols;
190 std::map<std::string, unsigned int> m_colIx;
192 std::string m_primColName;
194 static bool m_compileInit;
195 bool m_writeDisabled;
197 static void compileInit();
198 static bool compileComparison(Assertion::Operator* op,
199 std::string& sqlString);
200 static bool compileOperator(Assertion::Operator* op,
201 std::string &sqlString);
203 bool checkDType(Datatype* dtype,
const std::string& sqlType);
208 std::string m_password;
struct st_mysql_res MYSQL_RES
virtual VisitorState visitInterRow(InterRow *)
virtual Visitor::VisitorState visitRdb(Rdb *)
This method says if the visitor is recursive or not.
virtual bool isConnected()
Return true iff open has been done with no matching close.
std::ostream * getOut() const
virtual Visitor::VisitorState visitAssertion(Assertion *)
virtual VisitorState visitQuery(Query *)
std::ostream * getErrOut() const
virtual VisitorState visitSet(Set *)
virtual bool open(const std::string &host, const std::string &userid, const std::string &password, const std::string &dbName)
virtual ResultHandle * select(const std::string &tableName, const StringVector &getCols, const StringVector &orderCols, const Assertion *where=0, int rowLimit=0, int rowOffset=0)
virtual Visitor::VisitorState visitTable(Table *)
virtual Visitor::VisitorState visitIndex(Index *)
virtual bool compileAssertion(const Assertion *a, std::string &sqlString) const
virtual VisitorState visitSupersede(Supersede *)
virtual ResultHandle * dbRequest(const std::string &request)
virtual VisitorState visitInsertNew(InsertNew *)
virtual void disableModify(bool disable)
virtual ~MysqlConnection()
virtual MATCH matchSchema(Rdb *rdb, bool matchDbName=true)
virtual bool insertRow(const std::string &tableName, const StringVector &colNames, const StringVector &values, int *auto_value=0, const StringVector *nullCols=0)
virtual Visitor::VisitorState visitColumn(Column *)
std::vector< std::string > StringVector