#include <IOManagerDB.h>
Inheritance diagram for SctArchiving::IOManagerDB:
Public Member Functions | |
virtual void | write (const Sct::Serializable &ob, const Sct::IOParams *params=0) const |
write using default streamers | |
virtual shared_ptr< Sct::Serializable > | read (const string &name, const Sct::IOParams *params=0) const |
read using appropriate streamers | |
virtual std::string | status () const |
get some status information | |
Static Public Member Functions | |
IOManagerDB & | instance () |
retrieve access to singleton | |
Private Member Functions | |
IOManagerDB () | |
constructor. | |
MysqlQuery | getQuery () const |
get a null query. | |
void | prepareInsertion (const Sct::Serializable &ob, MysqlQuery &q) const |
change query to prepare to insert ob. | |
Static Private Member Functions | |
const SctData::ResultHeader & | getHeader (const Sct::Serializable &ob) |
get the header from a TestResult or ScanResult | |
std::string | getQueryMatching (const string &name) |
make the "`WHERE'" part of the query matching the name by building a IOName from it. | |
std::string | getTable (const Sct::Serializable &ob) |
find the name of the table which the ob should to into. | |
Private Attributes | |
boost::shared_ptr< ZlibStringCompressor > | m_compressor |
keep a string compressor handy to zip and unzip BLOB data. | |
boost::shared_ptr< MysqlConnection > | m_connection |
pointer to the database connection | |
Static Private Attributes | |
IOManagerDB * | s_man |
pointer to singleton |
It is expected to be used in archival, and so also makes use of streamer versioning by inheriting from IOManagerStreamerVersioned. Uses a mysql back-end.
Definition at line 21 of file IOManagerDB.h.
|
constructor.
Definition at line 36 of file IOManagerDB.cpp. References m_compressor, and m_connection. Referenced by instance(). |
|
get the header from a TestResult or ScanResult
Definition at line 68 of file IOManagerDB.cpp. References Sct::Streamable::getClassName(), and Sct::Serializable::getUniqueID(). Referenced by prepareInsertion(). |
Here is the call graph for this function:
|
get a null query.
Definition at line 63 of file IOManagerDB.cpp. References m_connection. |
|
make the "`WHERE'" part of the query matching the name by building a IOName from it.
Referenced by read(). |
|
find the name of the table which the ob should to into.
Definition at line 104 of file IOManagerDB.cpp. Referenced by prepareInsertion(). |
|
retrieve access to singleton
Definition at line 46 of file IOManagerDB.cpp. References IOManagerDB(), and s_man. |
Here is the call graph for this function:
|
change query to prepare to insert ob.
Definition at line 86 of file IOManagerDB.cpp. References Sct::Streamable::getClassName(), Sct::Archive::IOManagerArchive::getCompressionLevel(), SctData::ResultHeader::getEndTime(), getHeader(), SctData::UniqueID::getModule(), SctData::UniqueID::getRunNumber(), SctData::UniqueID::getScanNumber(), SctData::ResultHeader::getStartTime(), getTable(), SctData::ResultHeader::getUniqueID(), m_compressor, and Sct::Archive::IOManagerStreamerVersioned::writeImpl(). Referenced by write(). |
Here is the call graph for this function:
|
read using appropriate streamers
Definition at line 146 of file IOManagerDB.cpp. References Sct::Archive::IOManagerStreamerVersioned::getMutex(), getQuery(), getQueryMatching(), Sct::Archive::IOManagerStreamerVersioned::getReadVersionMap(), m_compressor, Sct::Archive::IOManagerStreamerVersioned::readImpl(), and Sct::Archive::IOManagerStreamerVersioned::setReadMode(). |
Here is the call graph for this function:
|
get some status information
Implements Sct::Archive::IOManagerArchive. Definition at line 51 of file IOManagerDB.cpp. References m_compressor. |
|
write using default streamers
Definition at line 108 of file IOManagerDB.cpp. References Sct::Archive::IOManagerStreamerVersioned::getMutex(), getQuery(), prepareInsertion(), and Sct::Archive::IOManagerStreamerVersioned::setReadMode(). |
Here is the call graph for this function:
|
keep a string compressor handy to zip and unzip BLOB data.
Definition at line 39 of file IOManagerDB.h. Referenced by IOManagerDB(), prepareInsertion(), read(), and status(). |
|
pointer to the database connection
Definition at line 40 of file IOManagerDB.h. Referenced by getQuery(), and IOManagerDB(). |
|
pointer to singleton
Definition at line 44 of file IOManagerDB.cpp. Referenced by instance(). |