dca::DbConnection Class Reference
[DCA Base Package]

#include <base_classes.h>

List of all members.


Detailed Description

Database connection class for a local or remote database.

Before a database can be used a connection to the database has to be established. This class is used to connect to a local or a remote database.

See also:
DcaInstance::createDbConnection, DbConnectionData

Definition at line 857 of file base_classes.h.

Public Member Functions

std::string getDatabaseVersion () const
 Returns the currently used database version.
DatabaseInformation getDatabaseInformation () const
 Returns information about the underlying database.
LogLevel setLogLevel (LogLevel newLevel)
 Sets the logging level for the given class instance. The old value will be returned.

Member Function Documentation

std::string dca::DbConnection::getDatabaseVersion (  )  const

Returns the currently used database version.

If the DbConnection is valid and connected to a database this is the version of the database. The format is <major>.<minor>
Where major is a number usually 6 for local databases and 5 or 6 for remote databases and minor is a 8-digit number with leading 0's
Examples:
local: "6.00012345" remote "5.00023478"

Returns:
The version string of the connected database or an empty string if not connected
Note:
When using a local database the string returns the version of the newest used update file that is not neccessarily been merged into a database file but already used.
DatabaseInformation dca::DbConnection::getDatabaseInformation (  )  const

Returns information about the underlying database.

See also:
dca::DatabaseInformation
Returns:
aDatabaseInformation The struct to contain database information
Exceptions:
An exception of type ExDca is thrown if this function fails e.g. the DbConnection object isn't initialized before.
LogLevel dca::DbConnection::setLogLevel ( LogLevel  newLevel  ) 

Sets the logging level for the given class instance. The old value will be returned.

Usually the logging level is set to LOG_Notice.

Parameters:
[in] newLevel The new LogLevel the class instance should use for logging
Returns:
The old used logging level.

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

Generated on 26 Sep 2016 for dca_interface by  doxygen 1.6.1