1 #ifndef CARMA_DBMS_MYSQLDBCONNECTION_H
2 #define CARMA_DBMS_MYSQLDBCONNECTION_H
17 #include "mysql/mysql_version.h"
19 #include "mysql/mysql.h"
31 static const std::string DBUSER;
32 static const std::string RDBMS;
33 static const std::string ODBC_DATASRC;
34 static const std::string TEST_ODBC_DATASRC;
48 (
const std::string& filename,
const std::string& table,
49 const bool& useTransactions,
const int& linesToIgnore=0,
50 const std::string& columnDelimiter=
"\t")
const;
54 (
const file2TableMap& file2Table,
const bool& useTransactions,
55 const int& linesToIgnore=0,
const std::string& columnDelimiter=
"\t")
93 const std::string& tag,
94 const std::string *
const location)
const;
143 #endif // CARMA_DBMS_MYSQLDBCONNECTION_H
void beginTransaction() const
begin a transaction
Class used for configuring a DBConnection.
MonitorAggregateType
aggregate data type of the monitor[point,data file, table]
virtual std::string caseSensitiveSearchModifier() const
get the modifier necessary for a case-sensitive text search
virtual bool inTransaction() const
is a transaction being executed?
virtual void commitTransaction() const
commit a transaction
std::map< std::string, std::string > file2TableMap
type to map data file names to tables they should be loaded into
virtual void repairMonitorDataTable(const std::string &tableName) const
attempt to repair a corrupt monitor data table
DBConnection and DBConnectionFactory classes.
virtual void rollBackTransaction() const
rollback a transaction
void loadDataFromFiles(const file2TableMap &file2Table, const bool &useTransactions, const int &linesToIgnore=0, const std::string &columnDelimiter="\t") const
load data into tables from disk files.
virtual unsigned maxTablesPerJoin() const
the maximum number of tables the RDBMS allows in a join
void loadDataFromFile(const std::string &filename, const std::string &table, const bool &useTransactions, const int &linesToIgnore=0, const std::string &columnDelimiter="\t") const
destructor
virtual void monitorDataTableHasBeenPopulated(const std::string &tableName, const MonitorAverageType &averageType) const
performs tasks after a monitor data table has been completely populated.
MonitorAverageType
average type of the monitor[point,data file,table]
MySQLDBConnection(const DBConfigurator *dbconf)
constructor
virtual unsigned maxColumnsPerTable() const
the maximum number of columns the RDBMS allows in a table
an abstract class from which database queries may be launched.
virtual std::string createMonitorDataTable(const MonitorAverageType &averageType, const MonitorAggregateType &aggType, const std::string &tag, const std::string *const location) const
create a monitor data table
an DBConnection implementation for MySQL