#include <CdbRooDb.hh>
Inheritance diagram for CdbRooDb:

Public Member Functions | |
| CdbRooDb () | |
| The default constructor. | |
| virtual | ~CdbRooDb () |
| The destructor. | |
| virtual const char * | technologyName () const |
| Get the technology name of this instance. | |
| virtual const char * | implementationName () const |
| Get the implementation name of this instance. | |
| virtual void | initialize () |
| Initialize the API. | |
| virtual bool | isInitialized () |
| Check if the API is initialized. | |
| virtual CdbStatus | getDefaultDatabase (std::string &theDatabaseName) |
| Get default database name. | |
| virtual CdbStatus | getDefaultView (std::string &theViewName, const char *theDatabaseName) |
| Get default view name. | |
| virtual CdbStatus | setDefaultDatabase (const char *theDatabaseName) |
| Set default database name. | |
| virtual CdbStatus | setDefaultView (const char *theViewName, const char *theDatabaseName) |
| Set default view name. | |
| virtual CdbStatus | findDatabase (CdbDatabasePtr &thePtr, const char *theName=0) |
| Find the specified Database. | |
| virtual CdbStatus | databaseIterator (CdbDatabaseItr &theItr) |
| Initialize an instance of an iterator for the known databases names. | |
| virtual CdbStatus | createObject (CdbObjectPtr &theObjectPtr, const CdbConditionPtr &theParentConditionPtr, const BdbTime &theOriginalValidityBeginTime, const BdbTime &theOriginalValidityEndTime, const BdbTime &theVisibleValidityBeginTime, const BdbTime &theVisibleValidityEndTime, const BdbTime &theDurationBeginTime, const BdbTime &theDurationEndTime, const BdbTime &theInsertionTime, const CdbSQLObjectId &theObjectId) |
| Create a metadata object of a right type. | |
| virtual CdbStatus | storeObject (CdbObjectPtr &theObjectPtr, CdbObjectFactoryBase &theObjectFactory, CdbCPtr< CdbSQLCondition > &thePersistentConditionPtr, CdbCPtr< CdbSQLPartition > &thePersistentPartitionPtr, const CdbConditionPtr &theParentConditionPtr, const BdbTime &theOriginalValidityBeginTime, const BdbTime &theOriginalValidityEndTime) |
| Create a persistent object (in the specified context) and store it in a database. | |
Protected Member Functions | |
| virtual CdbTransactionBase * | transaction (CdbTransaction::Mode theMode) const |
| Get the transaction manager and start new transaction if needed. | |
This implementation of the CDB API provides full access to serialized ROOT objects stored in MySQL database.
This implementation supports only one installation whose parameters (host, location, etc.) are specified either implicitly through a special environment variable:
CDB_DATABASE_PATH = "[host=[,user=[,database=[,port=]]]]"
or explicitly using the CdbEnvironment class.
The default is:
host = 'localhost' user = 'cdb' database = 'cdb' port = '3306'
DESIGN NOTE: Please, not from which base this class is deriving from. We do it in this way in order to provide the generic API implementation at the level of CdbSQl package with a mechanism of creating CdbObject-s of the right type (which is CdbRooDbObject). See the "::createObject()" below.
CdbSQLApi::::createObject()
Definition at line 45 of file CdbRooDb.hh.
|
|
The default constructor. More details... Definition at line 69 of file CdbRooDb.cc. References CDB_DEBUG_STREAM, CdbRooDatabase::implementation(), Cdb::set(), and CdbRooDatabase::technology(). |
|
|
The destructor. More details... Definition at line 94 of file CdbRooDb.cc. |
|
||||||||||||||||||||||||||||||||||||||||||||
|
Create a metadata object of a right type. Implements the corresponding method from the base class or interface.
Implements CdbSQLApi. Definition at line 433 of file CdbRooDb.cc. References isInitialized(), CdbCPtr< CdbCondition, CdbAlwaysClosePolicy< CdbCondition > >::isNull(), CdbSQLObjectId::isValid(), and CdbStatus::Success. Referenced by storeObject(). |
|
|
Initialize an instance of an iterator for the known databases names. Implements the corresponding method from the base class or interface.
Implements Cdb. Definition at line 399 of file CdbRooDb.cc. References CdbDatabaseItr, CdbStatus::Error, Cdb::get(), implementationName(), isInitialized(), CdbStatus::Success, and technologyName(). |
|
||||||||||||
|
Find the specified Database. Implements the corresponding method from the base class or interface.
Implements Cdb. Definition at line 327 of file CdbRooDb.cc. References CdbStatus::Error, Cdb::get(), getDefaultDatabase(), implementationName(), isInitialized(), CdbStatus::Success, and technologyName(). |
|
|
Get default database name. Implements the corresponding method from the base class or interface.
Implements Cdb. Definition at line 157 of file CdbRooDb.cc. References isInitialized(), and CdbStatus::Success. Referenced by findDatabase(). |
|
||||||||||||
|
Get default view name. Implements the corresponding method from the base class or interface.
Implements Cdb. Definition at line 167 of file CdbRooDb.cc. References isInitialized(), CdbStatus::NotFound, and CdbStatus::Success. |
|
|
Get the implementation name of this instance. Implements the corresponding method from the base class or interface.
Implements Cdb. Definition at line 104 of file CdbRooDb.cc. References CdbRooDatabase::implementation(). Referenced by databaseIterator(), and findDatabase(). |
|
|
Initialize the API. Implements the corresponding method from the base class or interface.
Implements Cdb. Definition at line 110 of file CdbRooDb.cc. References CdbCPtr< P, CLOSE_POLICY >::isNull(), and CdbStatus::Success. |
|
|
Check if the API is initialized. Implements the corresponding method from the base class or interface.
Implements Cdb. Definition at line 151 of file CdbRooDb.cc. Referenced by createObject(), databaseIterator(), findDatabase(), getDefaultDatabase(), getDefaultView(), setDefaultDatabase(), and setDefaultView(). |
|
|
Set default database name. Implements the corresponding method from the base class or interface.
Implements Cdb. Definition at line 204 of file CdbRooDb.cc. References CdbStatus::IllegalParameters, isInitialized(), CdbCPtr< P, CLOSE_POLICY >::isNull(), CdbStatus::NotFound, and CdbStatus::Success. |
|
||||||||||||
|
Set default view name. Implements the corresponding method from the base class or interface.
Implements Cdb. Definition at line 269 of file CdbRooDb.cc. References isInitialized(), CdbStatus::NotFound, and CdbStatus::Success. |
|
||||||||||||||||||||||||||||||||
|
Create a persistent object (in the specified context) and store it in a database. Implements the corresponding method from the base class or interface.
Implements CdbSQLApi. Definition at line 482 of file CdbRooDb.cc. References CdbObjectFactoryBase::create(), createObject(), CdbStatus::Error, CdbCPtr< P, CLOSE_POLICY >::get(), CdbCPtr< P, CLOSE_POLICY >::isNull(), CdbCPtr< CdbObject, CdbDoNotClosePolicy< CdbObject > >::isNull(), CdbRooObjectFactory::persistentObjectPtr(), and CdbStatus::Success. |
|
|
Get the technology name of this instance. Implements the corresponding method from the base class or interface.
Implements Cdb. Definition at line 98 of file CdbRooDb.cc. References CdbRooDatabase::technology(). Referenced by databaseIterator(), and findDatabase(). |
|
|
Get the transaction manager and start new transaction if needed. Implements the corresponding method from the base class or interface.
Implements Cdb. Definition at line 427 of file CdbRooDb.cc. |
1.3-rc3