48 QwDatabase(
const string &major =
"00",
const string &minor =
"00",
const string &point =
"0000");
49 QwDatabase(
QwOptions &options,
const string &major =
"00",
const string &minor =
"00",
const string &point =
"0000");
64 void ProcessOptions(
const TString& dbname,
const TString& username,
const TString& passwd,
const TString& dbhost=
"localhost",
const Int_t dbport = 0,
const TString& accesslevel =
"ro");
66 mysqlpp::Query
Query(
const char *qstr=0 ) {
return query(qstr);}
67 mysqlpp::Query
Query(
const std::string &qstr) {
return query(qstr);}
UInt_t fDBPortNumber
Port number to connect to on server (mysql default port is 3306)
Bool_t ValidateConnection()
Checks that given connection parameters result in a valid connection.
QwDatabase(const string &major="00", const string &minor="00", const string &point="0000")
Simple constructor.
const string kValidVersionPoint
Bool_t Connect()
Open a connection to the database using the predefined parameters.
void ProcessOptions(QwOptions &options)
Processes the options contained in the QwOptions object.
QwDatabase & operator=(const QwDatabase &rhs)
Assignment operator (not implemented)
A database interface class.
string fDBServer
Name of server carrying DB to connect to.
const string GetValidVersion()
const string GetVersionMinor()
virtual ~QwDatabase()
Destructor.
void SetAccessLevel(string accesslevel)
Sets the access level flag based on string labels: "off", "ro", "rw".
string fVersionMajor
Major version number of current DB schema.
const string GetVersion()
EQwDBAccessLevel fAccessLevel
Access level of the database instance.
const string kValidVersionMajor
const string GetVersionMajor()
Return a full version string for the DB schema.
Bool_t AllowsWriteAccess()
string fDBPassword
DB account password.
A logfile class, based on an identical class in the Hermes analyzer.
const string kValidVersionMinor
Bool_t AllowsReadAccess()
Bool_t fValidConnection
True if a valid connection was established using defined connection information.
string fVersionPoint
Point version number of current DB schema.
mysqlpp::Query Query(const char *qstr=0)
string fDBUsername
Name of account to connect to DB server with.
const string GetVersionPoint()
string fVersionMinor
Minor version number of current DB schema.
string fDatabase
Name of database to connect to.
An options class which parses command line, config file and environment.
const string GetServerVersion()
mysqlpp::Query Query(const std::string &qstr)
static void DefineOptions(QwOptions &options)
Defines available class options for QwOptions.
bool StoreDBVersion()
Retrieve database schema version information from database.