Analysis Software
Documentation for sPHENIX simulation software
|
#include <RDBC/blob/master/include/RDBC/odbc++/connection.h>
Public Types | |
enum | TransactionIsolation { TRANSACTION_NONE, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_READ_COMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE } |
Private Member Functions | |
SQLUINTEGER | _getNumericOption (SQLINTEGER optnum) |
ODBCXX_STRING | _getStringOption (SQLINTEGER optnum) |
void | _setNumericOption (SQLINTEGER optnum, SQLUINTEGER value) |
void | _setStringOption (SQLINTEGER optnum, const ODBCXX_STRING &value) |
SQLHSTMT | _allocStmt () |
Connection (SQLHDBC h) | |
void | _connect (const ODBCXX_STRING &dsn, const ODBCXX_STRING &user, const ODBCXX_STRING &password) |
void | _connect (const ODBCXX_STRING &connectString) |
void | _registerStatement (Statement *stmt) |
void | _unregisterStatement (Statement *stmt) |
const DriverInfo * | _getDriverInfo () const |
Private Attributes | |
PD * | pd_ |
SQLHDBC | hdbc_ |
DatabaseMetaData * | metaData_ |
DriverInfo * | driverInfo_ |
Friends | |
class | DriverManager |
class | Statement |
class | DatabaseMetaData |
class | DriverInfo |
Additional Inherited Members | |
Protected Member Functions inherited from odbc::ErrorHandler | |
void | _postWarning (SQLWarning *w) |
void | _checkErrorODBC2 (SQLHENV henv, SQLHDBC hdbc, SQLHSTMT hstmt, SQLRETURN r, const ODBCXX_STRING &what) |
void | _checkStmtError (SQLHSTMT hstmt, SQLRETURN r, const char *what="") |
void | _checkConError (SQLHDBC hdbc, SQLRETURN r, const char *what="") |
void | _checkEnvError (SQLHENV henv, SQLRETURN r, const char *what="") |
ErrorHandler (bool collectWarnings=true) | |
A database connection
Definition at line 38 of file connection.h.
View newest version in sPHENIX GitHub at line 38 of file connection.h
Transaction isolation constants.
Definition at line 81 of file connection.h.
View newest version in sPHENIX GitHub at line 81 of file connection.h
|
private |
|
virtual |
Destructor. Closes the connection
|
private |
|
private |
|
private |
|
inlineprivate |
Definition at line 74 of file connection.h.
View newest version in sPHENIX GitHub at line 74 of file connection.h
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
void odbc::Connection::commit | ( | ) |
Commits the ongoing transaction
Referenced by ODBCConnection::Commit().
Statement* odbc::Connection::createStatement | ( | ) |
Creates a non-prepared statement
Referenced by OnCalServer::add_calibrator_to_statustable(), PktSizeDBodbc::AddRow(), OnlMonDBodbc::AddRow(), OnlMonClient::CacheRunDB(), OnlMonServer::CacheRunDB(), OnCalServer::check_calibrator_in_statustable(), OnCalServer::check_create_subsystable(), OnCalServer::check_create_successtable(), PktSizeDBodbc::CheckAndAddColumns(), OnlMonStatusDB::CheckAndCreateMonitor(), OnlMonStatusDB::CheckAndCreateTable(), PktSizeDBodbc::CheckAndCreateTable(), OnlMonDBodbc::CheckAndCreateTable(), OnCalServer::ClosestGoodRun(), OnCalServer::CreateCalibration(), ODBCConnection::CreateStatement(), OnlMonDBodbc::CreateTable(), FROG::dCacheSearch(), OnlMonDBodbc::DropTable(), OnlMonDBodbc::Dump(), OnlMonStatusDB::FindAndInsertRunNum(), OnCalServer::FindClosestCalibratedRun(), OnlMonStatusDB::findRunNumInDB(), OnCalServer::findRunNumInDB(), OnCalServer::FixMissingCalibration(), OnCalServer::GetCalibStatus(), OnCalDBodbc::GetLastCalibratedRun(), OnCalServer::GetLastGoodRunTS(), PktSizeDBodbc::GetPacketContent(), RunToTimePg::getRunNumber(), RunDBodbc::GetRunNumbers(), RunToTimePg::getTime(), OnlMonDBodbc::GetVar(), OnlMonDBodbc::Info(), OnCalServer::insertRunNumInDB(), FROG::LustreSearch(), FROG::MinIOSearch(), FROG::PGSearch(), RunDBodbc::RunType(), OnCalServer::SyncCalibTimeStampsToOnCal(), OnCalServer::SyncOncalTimeStampsToRunDB(), OnCalServer::updateDB(), OnCalServer::updateDBRunRange(), OnlMonStatusDB::UpdateStatus(), and FROG::XRootDSearch().
Statement* odbc::Connection::createStatement | ( | int | resultSetType, |
int | resultSetConcurrency | ||
) |
bool odbc::Connection::getAutoCommit | ( | ) |
Returns true if autocommit is on
Referenced by ODBCConnection::GetAutoCommit().
ODBCXX_STRING odbc::Connection::getCatalog | ( | ) |
Returns the current catalog
Referenced by OnlMonDBodbc::DropTable(), and ODBCConnection::GetCatalog().
DatabaseMetaData* odbc::Connection::getMetaData | ( | ) |
Returns meta information for this connection.
Note that the returned object is 'owned' by this connection and should in no way be deleted by the caller.
Referenced by ClassImpQ(), OnlMonDBodbc::DropTable(), ODBCConnection::GetMetaData(), OnlMonDBodbc::Info(), and ODBCConnection::ODBCConnection().
bool odbc::Connection::getTrace | ( | ) |
Returns true if ODBC tracing is enabled on this connection
Referenced by ODBCConnection::GetTrace().
ODBCXX_STRING odbc::Connection::getTraceFile | ( | ) |
Returns the file ODBC tracing is currently written to
Referenced by ODBCConnection::GetTraceFile().
TransactionIsolation odbc::Connection::getTransactionIsolation | ( | ) |
Returns the current transaction isolation level
Referenced by ODBCConnection::GetTransactionIsolation().
bool odbc::Connection::isReadOnly | ( | ) |
Returns true if the connection is read only
Referenced by ODBCConnection::IsReadOnly().
ODBCXX_STRING odbc::Connection::nativeSQL | ( | const ODBCXX_STRING & | sql | ) |
Translate a given SQL string into this data sources' own SQL grammar.
Referenced by ODBCConnection::NativeSQL().
CallableStatement* odbc::Connection::prepareCall | ( | const ODBCXX_STRING & | sql | ) |
Create a callable prepared statement.
sql | The string to prepare, optionally containing parameter markers for input and/or output parameters |
Referenced by ODBCConnection::PrepareCall().
CallableStatement* odbc::Connection::prepareCall | ( | const ODBCXX_STRING & | sql, |
int | resultSetType, | ||
int | resultSetConcurrency | ||
) |
PreparedStatement* odbc::Connection::prepareStatement | ( | const ODBCXX_STRING & | sql | ) |
Create a prepared statement.
sql | The string to prepare, optionally containing parameter markers (? ). |
Referenced by ODBCConnection::PrepareStatement(), OnCalServer::SyncCalibTimeStampsToOnCal(), and OnCalServer::SyncOncalTimeStampsToRunDB().
PreparedStatement* odbc::Connection::prepareStatement | ( | const ODBCXX_STRING & | sql, |
int | resultSetType, | ||
int | resultSetConcurrency | ||
) |
void odbc::Connection::rollback | ( | ) |
Rollbacks the ongoing transaction
Referenced by ODBCConnection::Rollback().
void odbc::Connection::setAutoCommit | ( | bool | autoCommit | ) |
Sets the autocommit state of this connection
autoCommit | true for on, false for off |
Referenced by ODBCConnection::SetAutoCommit().
void odbc::Connection::setCatalog | ( | const ODBCXX_STRING & | catalog | ) |
Sets the current catalog
Referenced by ODBCConnection::SetCatalog().
void odbc::Connection::setReadOnly | ( | bool | readOnly | ) |
Sets the read-only state of this connection
Referenced by ODBCConnection::SetReadOnly().
void odbc::Connection::setTrace | ( | bool | on | ) |
Sets ODBC tracing on or off
Referenced by ODBCConnection::SetTrace().
void odbc::Connection::setTraceFile | ( | const ODBCXX_STRING & | s | ) |
Sets the file ODBC tracing is written to
Referenced by ODBCConnection::SetTraceFile().
void odbc::Connection::setTransactionIsolation | ( | TransactionIsolation | isolation | ) |
Sets the current transaction isolation level
|
friend |
Definition at line 41 of file connection.h.
View newest version in sPHENIX GitHub at line 41 of file connection.h
|
friend |
Definition at line 42 of file connection.h.
View newest version in sPHENIX GitHub at line 42 of file connection.h
|
friend |
Definition at line 39 of file connection.h.
View newest version in sPHENIX GitHub at line 39 of file connection.h
|
friend |
Definition at line 40 of file connection.h.
View newest version in sPHENIX GitHub at line 40 of file connection.h
|
private |
Definition at line 52 of file connection.h.
View newest version in sPHENIX GitHub at line 52 of file connection.h
|
private |
Definition at line 49 of file connection.h.
View newest version in sPHENIX GitHub at line 49 of file connection.h
|
private |
Definition at line 51 of file connection.h.
View newest version in sPHENIX GitHub at line 51 of file connection.h
|
private |
Definition at line 45 of file connection.h.
View newest version in sPHENIX GitHub at line 45 of file connection.h