CompleteDB Embedded: Direct C++ API  2.4.2
Database Class Reference

Database class represents a physical CompleteDB Embedded database. More...

#include <Database.hpp>

+ Inheritance diagram for Database:

Public Member Functions

bool cast (const Object &from)
bool isConnected () const
bool isDisconnected () const
Type::Enum getClassType () const
Type::Enum getObjectType () const
Error::Enum getLastErrorId () const
const char * getLastError () const
const char * getName () const
TableIterator getTables ()
CreateTable createTable (const char *name)
bool commit ()
bool connect (const char *databaseName)
bool containsColumn (const char *tableName, const char *columnName)
bool containsColumn (const IdentityInfo &tableName, const IdentityInfo &columnName)
bool containsTable (const char *name)
bool containsTable (const IdentityInfo &name)
bool disconnect ()
bool rollback ()
Config getConfig ()
Record getTableRecord (const char *tableName)
Record getTableRecord (const IdentityInfo &tableName)
Table getTable (const char *name)
Table getTable (const IdentityInfo &name)
Databaseoperator= (const Database &src)
 Database (const Database &src)
virtual ~Database ()
 Database ()
- Public Member Functions inherited from Object
void * get () const
Objectoperator= (const Object &src)
 Object (const Object &src)
virtual ~Object ()
 Object ()
- Public Member Functions inherited from LastError
LastErroroperator= (const LastError &src)
 LastError (const LastError &src)
virtual ~LastError ()
 LastError ()
- Public Member Functions inherited from DatabaseInfo
DatabaseInfooperator= (const DatabaseInfo &src)
 DatabaseInfo (const DatabaseInfo &src)
virtual ~DatabaseInfo ()
 DatabaseInfo ()
- Public Member Functions inherited from TableDdl
TableDdloperator= (const TableDdl &src)
 TableDdl (const TableDdl &src)
virtual ~TableDdl ()
 TableDdl ()

Additional Inherited Members

- Protected Member Functions inherited from Object
 Object (void *src)
- Protected Attributes inherited from Object
void * m

Detailed Description

Database class represents a physical CompleteDB Embedded database.

Definition at line 22 of file Database.hpp.

Constructor & Destructor Documentation

Database ( const Database src)
inline

Definition at line 143 of file Database.hpp.

virtual ~Database ( )
inlinevirtual

Definition at line 147 of file Database.hpp.

Database ( )
inline

Definition at line 148 of file Database.hpp.

Member Function Documentation

bool cast ( const Object from)
inlinevirtual

Performs safe typecast.

Reimplemented from DatabaseInfo.

Definition at line 34 of file Database.hpp.

bool commit ( )
inline

Commits the database transaction.

Definition at line 89 of file Database.hpp.

bool connect ( const char *  databaseName)
inline

Connects to an existing database. Creates database and connects to it if database does not exist.

Definition at line 94 of file Database.hpp.

bool containsColumn ( const char *  tableName,
const char *  columnName 
)
inline

Determines wether the database table contains a column with the specified name.

Definition at line 98 of file Database.hpp.

bool containsColumn ( const IdentityInfo tableName,
const IdentityInfo columnName 
)
inline

Determines wether the database table contains a column with the specified name.

Definition at line 102 of file Database.hpp.

bool containsTable ( const char *  name)
inline

Determines wether the database contains a table with the specified name.

Definition at line 106 of file Database.hpp.

bool containsTable ( const IdentityInfo name)
inline

Determines wether the database contains a table with the specified name.

Definition at line 110 of file Database.hpp.

CreateTable createTable ( const char *  name)
inlinevirtual

Gets CreateTable statement.

Reimplemented from TableDdl.

Definition at line 82 of file Database.hpp.

bool disconnect ( )
inline

Disconnects from a connected database and releases all database resources.

Definition at line 114 of file Database.hpp.

Type::Enum getClassType ( ) const
inlinevirtual

class type of the object.

Reimplemented from DatabaseInfo.

Definition at line 46 of file Database.hpp.

Config getConfig ( )
inline

Gets the Config parameters of the database

Definition at line 122 of file Database.hpp.

const char* getLastError ( ) const
inlinevirtual

Retrieves the calling object last-error text message.

Reimplemented from LastError.

Definition at line 61 of file Database.hpp.

Error::Enum getLastErrorId ( ) const
inlinevirtual

Retrieves the calling object last-error id value.

Reimplemented from LastError.

Definition at line 57 of file Database.hpp.

const char* getName ( ) const
inlinevirtual

Returns the name of the entity.

Reimplemented from DatabaseInfo.

Definition at line 68 of file Database.hpp.

Type::Enum getObjectType ( ) const
inlinevirtual

object type of the underlying derived object.

Reimplemented from DatabaseInfo.

Definition at line 50 of file Database.hpp.

Table getTable ( const char *  name)
inline

Gets existing table from the database.

Definition at line 134 of file Database.hpp.

Table getTable ( const IdentityInfo name)
inline

Gets existing table from the database.

Definition at line 138 of file Database.hpp.

Record getTableRecord ( const char *  tableName)
inline

Gets Record Statement from existing table of the database.

Definition at line 126 of file Database.hpp.

Record getTableRecord ( const IdentityInfo tableName)
inline

Gets Record Statement from existing table of the database.

Definition at line 130 of file Database.hpp.

TableIterator getTables ( )
inlinevirtual

Gets Table iterator used to iterate tables information in the database.

Reimplemented from DatabaseInfo.

Definition at line 75 of file Database.hpp.

bool isConnected ( ) const
inlinevirtual

if underlying database is connected.

Reimplemented from DatabaseInfo.

Definition at line 38 of file Database.hpp.

bool isDisconnected ( ) const
inlinevirtual

if underlying database is not connected.

Reimplemented from DatabaseInfo.

Definition at line 42 of file Database.hpp.

Database& operator= ( const Database src)
inline

Definition at line 142 of file Database.hpp.

bool rollback ( )
inline

Rolls back a transaction from a pending state.

Definition at line 118 of file Database.hpp.


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