cqosdb::DB Class Reference

DB interfaces specifies a set of database operations to be supported. More...

#include <DB.hxx>

Inheritance diagram for cqosdb::DB:

cqosdb::MetaDB

List of all members.

Public Member Functions

virtual ~DB ()
virtual bool connect ()=0
 Connect to a database server.
virtual void disconnect ()=0
 Disconnect to a database server.
virtual bool isClosed ()=0
 Test if connected to a database.
virtual void setConnectionInfo (string info)=0
 Set up connection information, which typically includes database server name, port number, user authorization etc.
virtual string getConnectionInfo ()=0
 Get the connection setup information.
virtual int bindParameters (int param, int argument)=0
 Pass an integer parameter to SQL command text.
virtual int bindParameters (int param, long argument)=0
 Pass a long parameter to SQL command text.
virtual int bindParameters (int param, double argument)=0
 Pass a double parameter to SQL command text.
virtual int bindParameters (int param, string argument)=0
 Pass a string parameter to SQL command text.
virtual void bindCommand ()=0
 Bind parameters to SQL command text, the function is usually called immediately before executing a SQL command.
virtual void resetQuery ()=0
 Reset query statement.
virtual int executeQuery_bindParam (string &commd, Outcome *res)=0
 Submits a command to the server and waits for the result, with the ability to pass parameters separately from the SQL command text.
virtual int executeQuery (string &commd, Outcome *res)=0
 Submits a command to the server and waits for the result, without passing parameters separately.
virtual int executeInsert (string &commd)=0
 Submits a 'insert' command to the server.
virtual void storeParameter (int trialID, string interEvt, Parameter &aParam)=0
 Store a parameter into database.
virtual void storeParameterSet (int trialID, string interEvt, ParameterSet &aParamSet)=0
 Store a set of parameters into database.
virtual int getMatchingTrialsBetween (ParameterSet &lower, ParameterSet &upper, Outcome *trialIDs)=0
 Retrieve trials from database, which satisfies that its parameter set value is within [lower, upper].
virtual int getMatchingTrials (ParameterSet &lower, vector< double > epsilons, Outcome *trialIDs)=0
 Retrieve trials from database, which satisfies that its parameter set value is within [lower-epsilons, lower+epsilons].
virtual void getParameter (int trialID, string interEvt, Parameter *aParam)=0
 Retrieve parameter value from database.
virtual void getParameterSet (int trialID, string interEvt, ParameterSet *aParamSet)=0
 Retrieve parameter set values from database.


Detailed Description

DB interfaces specifies a set of database operations to be supported.

Constructor & Destructor Documentation

virtual cqosdb::DB::~DB (  )  [inline, virtual]


Member Function Documentation

virtual bool cqosdb::DB::connect (  )  [pure virtual]

Connect to a database server.

Implemented in cqosdb::MetaDB.

virtual void cqosdb::DB::disconnect (  )  [pure virtual]

Disconnect to a database server.

Implemented in cqosdb::MetaDB.

virtual bool cqosdb::DB::isClosed (  )  [pure virtual]

Test if connected to a database.

Implemented in cqosdb::MetaDB.

virtual void cqosdb::DB::setConnectionInfo ( string  info  )  [pure virtual]

Set up connection information, which typically includes database server name, port number, user authorization etc.

Implemented in cqosdb::MetaDB.

virtual string cqosdb::DB::getConnectionInfo (  )  [pure virtual]

Get the connection setup information.

Implemented in cqosdb::MetaDB.

virtual int cqosdb::DB::bindParameters ( int  param,
int  argument 
) [pure virtual]

Pass an integer parameter to SQL command text.

Parameters:
param Index of parameter
argument Value of the parameter

Implemented in cqosdb::MetaDB.

virtual int cqosdb::DB::bindParameters ( int  param,
long  argument 
) [pure virtual]

Pass a long parameter to SQL command text.

Parameters:
param Index of parameter
argument Value of the parameter

Implemented in cqosdb::MetaDB.

virtual int cqosdb::DB::bindParameters ( int  param,
double  argument 
) [pure virtual]

Pass a double parameter to SQL command text.

Parameters:
param Index of parameter
argument Value of the parameter

Implemented in cqosdb::MetaDB.

virtual int cqosdb::DB::bindParameters ( int  param,
string  argument 
) [pure virtual]

Pass a string parameter to SQL command text.

Parameters:
param Index of parameter
argument Value of the parameter

Implemented in cqosdb::MetaDB.

virtual void cqosdb::DB::bindCommand (  )  [pure virtual]

Bind parameters to SQL command text, the function is usually called immediately before executing a SQL command.

Implemented in cqosdb::MetaDB.

virtual void cqosdb::DB::resetQuery (  )  [pure virtual]

Reset query statement.

Usually called after executing a SQL command

Implemented in cqosdb::MetaDB.

virtual int cqosdb::DB::executeQuery_bindParam ( string &  commd,
Outcome res 
) [pure virtual]

Submits a command to the server and waits for the result, with the ability to pass parameters separately from the SQL command text.

Parameters:
commd The SQL command string to be executed. If parameters are used, they are referred to in the command string as $1, $2, etc.
res Returned query result set

Implemented in cqosdb::MetaDB.

virtual int cqosdb::DB::executeQuery ( string &  commd,
Outcome res 
) [pure virtual]

Submits a command to the server and waits for the result, without passing parameters separately.

Parameters:
commd The SQL command string to be executed.
res Returned query result set

Implemented in cqosdb::MetaDB.

virtual int cqosdb::DB::executeInsert ( string &  commd  )  [pure virtual]

Submits a 'insert' command to the server.

Parameters:
commd The insert SQL command string to be executed.

Implemented in cqosdb::MetaDB.

virtual void cqosdb::DB::storeParameter ( int  trialID,
string  interEvt,
Parameter aParam 
) [pure virtual]

Store a parameter into database.

Implementation of the function is dependent on the database schema used.

Parameters:
trialID The trial associated with the parameter
interEvt The interval_event associated with the parameter
aParam The parameter to be stored

Implemented in cqosdb::MetaDB.

virtual void cqosdb::DB::storeParameterSet ( int  trialID,
string  interEvt,
ParameterSet aParamSet 
) [pure virtual]

Store a set of parameters into database.

Implementation of the function is dependent on the database schema used.

Parameters:
trialID The trial associated with the parameter set
interEvt The interval_event associated with the parameter set
aParamSet The parameter set to be stored

Implemented in cqosdb::MetaDB.

virtual int cqosdb::DB::getMatchingTrialsBetween ( ParameterSet lower,
ParameterSet upper,
Outcome trialIDs 
) [pure virtual]

Retrieve trials from database, which satisfies that its parameter set value is within [lower, upper].

Implementation of the function is dependent on the database schema used.

Parameters:
lower Lower bounds of the parameter set,
upper Upper bounds of the parameter set,
trialIDs Returned trial ids that meet the conditions

Implemented in cqosdb::MetaDB.

virtual int cqosdb::DB::getMatchingTrials ( ParameterSet lower,
vector< double >  epsilons,
Outcome trialIDs 
) [pure virtual]

Retrieve trials from database, which satisfies that its parameter set value is within [lower-epsilons, lower+epsilons].

Implementation of the function is dependent on the database schema used.

Parameters:
lower Pivort values of the parameter set,
epsilons Offset values
trialIDs Returned trial ids that meet the conditions

Implemented in cqosdb::MetaDB.

virtual void cqosdb::DB::getParameter ( int  trialID,
string  interEvt,
Parameter aParam 
) [pure virtual]

Retrieve parameter value from database.

Implementation of the function is dependent on the database schema used.

Parameters:
trialID The trial associated with the parameter
interEvt The interval_event associated with the parameter
aParam in - set parameter name and type; out - fill in value from database

Implemented in cqosdb::MetaDB.

virtual void cqosdb::DB::getParameterSet ( int  trialID,
string  interEvt,
ParameterSet aParamSet 
) [pure virtual]

Retrieve parameter set values from database.

Implementation of the function is dependent on the database schema used.

Parameters:
trialID The trial associated with the parameter set
interEvt The interval_event associated with the parameter set
aParamSet in - set parameter set name and type; out - fill in values from database

Implemented in cqosdb::MetaDB.


The documentation for this class was generated from the following file:

Generated on Tue Sep 23 19:59:06 2008 for CQoS Database Library by  doxygen 1.5.5