Analysis Software
Documentation for sPHENIX simulation software
|
#include <RDBC/blob/master/include/RDBC/odbc++/statement.h>
Public Member Functions | |
virtual | ~Statement () |
Connection * | getConnection () |
void | cancel () |
virtual bool | execute (const ODBCXX_STRING &sql) |
virtual ResultSet * | executeQuery (const ODBCXX_STRING &sql) |
virtual int | executeUpdate (const ODBCXX_STRING &sql) |
int | getUpdateCount () |
ResultSet * | getResultSet () |
bool | getMoreResults () |
void | setCursorName (const ODBCXX_STRING &name) |
int | getFetchSize () |
void | setFetchSize (int size) |
int | getResultSetConcurrency () |
int | getResultSetType () |
int | getQueryTimeout () |
void | setQueryTimeout (int seconds) |
int | getMaxRows () |
void | setMaxRows (int maxRows) |
int | getMaxFieldSize () |
void | setMaxFieldSize (int maxFieldSize) |
void | setEscapeProcessing (bool on) |
bool | getEscapeProcessing () |
Public Member Functions inherited from odbc::ErrorHandler | |
void | clearWarnings () |
WarningList * | getWarnings () |
virtual | ~ErrorHandler () |
Protected Member Functions | |
const DriverInfo * | _getDriverInfo () const |
Statement (Connection *con, SQLHSTMT hstmt, int resultSetType, int resultSetConcurrency) | |
SQLUINTEGER | _getNumericOption (SQLINTEGER optnum) |
ODBCXX_STRING | _getStringOption (SQLINTEGER optnum) |
void | _setNumericOption (SQLINTEGER optnum, SQLUINTEGER value) |
void | _setStringOption (SQLINTEGER optnum, const ODBCXX_STRING &value) |
bool | _checkForResults () |
ResultSet * | _getResultSet (bool hideMe=false) |
void | _beforeExecute () |
void | _afterExecute () |
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) | |
Protected Attributes | |
Connection * | connection_ |
SQLHSTMT | hstmt_ |
int | lastExecute_ |
Private Types | |
enum | StatementState { STATE_CLOSED, STATE_OPEN } |
Private Attributes | |
ResultSet * | currentResultSet_ |
int | fetchSize_ |
int | resultSetType_ |
int | resultSetConcurrency_ |
StatementState | state_ |
std::vector< ODBCXX_STRING > | batches_ |
Friends | |
class | Connection |
class | ResultSet |
class | DatabaseMetaData |
A simple non-prepared statement
Definition at line 36 of file statement.h.
View newest version in sPHENIX GitHub at line 36 of file statement.h
|
private |
Definition at line 58 of file statement.h.
View newest version in sPHENIX GitHub at line 58 of file statement.h
|
protected |
|
virtual |
Destructor. Destroys/closes this statement as well as all created resultsets.
|
protected |
|
private |
|
protected |
|
protected |
|
private |
|
private |
|
private |
|
inlineprotected |
Definition at line 46 of file statement.h.
View newest version in sPHENIX GitHub at line 46 of file statement.h
|
private |
|
protected |
|
private |
|
private |
|
private |
|
private |
|
protected |
|
private |
|
private |
|
private |
|
private |
|
protected |
|
protected |
|
private |
void odbc::Statement::cancel | ( | ) |
Cancel an ongoing operation that was executed in another thread
Referenced by ODBCStatement::Cancel(), ODBCPreparedStatement::Cancel(), and ODBCCallableStatement::Cancel().
|
virtual |
Execute a given SQL statement. The statement can return multiple results. To get to the next result after processing the first one, getMoreResults() should be called.
sql | The string to execute |
Reimplemented in odbc::PreparedStatement.
Referenced by ODBCStatement::Execute(), ODBCPreparedStatement::Execute(), and ODBCCallableStatement::Execute().
|
virtual |
Execute an SQL statement, expected to return a resultset.
sql | The string to execute |
Reimplemented in odbc::PreparedStatement.
Referenced by 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(), OnlMonDBodbc::CreateTable(), FROG::dCacheSearch(), OnlMonDBodbc::Dump(), ODBCStatement::ExecuteQuery(), ODBCPreparedStatement::ExecuteQuery(), ODBCCallableStatement::ExecuteQuery(), 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(), FROG::LustreSearch(), FROG::MinIOSearch(), FROG::PGSearch(), RunDBodbc::RunType(), OnCalServer::SyncCalibTimeStampsToOnCal(), OnCalServer::SyncOncalTimeStampsToRunDB(), OnCalServer::updateDB(), and FROG::XRootDSearch().
|
virtual |
Execute an SQL statement, expected to return an update count.
Reimplemented in odbc::PreparedStatement.
Referenced by OnCalServer::add_calibrator_to_statustable(), PktSizeDBodbc::AddRow(), OnlMonDBodbc::AddRow(), OnCalServer::check_create_subsystable(), OnCalServer::check_create_successtable(), PktSizeDBodbc::CheckAndAddColumns(), OnlMonStatusDB::CheckAndCreateMonitor(), OnlMonStatusDB::CheckAndCreateTable(), PktSizeDBodbc::CheckAndCreateTable(), OnlMonDBodbc::CheckAndCreateTable(), OnlMonDBodbc::CreateTable(), OnlMonDBodbc::DropTable(), ODBCStatement::ExecuteUpdate(), ODBCPreparedStatement::ExecuteUpdate(), ODBCCallableStatement::ExecuteUpdate(), OnlMonStatusDB::FindAndInsertRunNum(), OnCalServer::insertRunNumInDB(), OnCalServer::updateDB(), OnCalServer::updateDBRunRange(), and OnlMonStatusDB::UpdateStatus().
Connection* odbc::Statement::getConnection | ( | ) |
Returns the connection that created this statement
bool odbc::Statement::getEscapeProcessing | ( | ) |
Gets the current escape processing setting
true
if escape processing is on, false
otherwise Referenced by ODBCStatement::GetEscapeProcessing(), ODBCPreparedStatement::GetEscapeProcessing(), and ODBCCallableStatement::GetEscapeProcessing().
|
inline |
Fetch the current fetch size (also called rowset size) for resultsets created by this statement.
Definition at line 209 of file statement.h.
View newest version in sPHENIX GitHub at line 209 of file statement.h
Referenced by ODBCStatement::GetFetchSize(), ODBCPreparedStatement::GetFetchSize(), and ODBCCallableStatement::GetFetchSize().
int odbc::Statement::getMaxFieldSize | ( | ) |
Get the maximum field size for resultsets create by this statement
Referenced by ODBCStatement::GetMaxFieldSize(), ODBCPreparedStatement::GetMaxFieldSize(), and ODBCCallableStatement::GetMaxFieldSize().
int odbc::Statement::getMaxRows | ( | ) |
Get the maximum number of rows to return in a resultset
Referenced by ODBCStatement::GetMaxRows(), ODBCPreparedStatement::GetMaxRows(), and ODBCCallableStatement::GetMaxRows().
bool odbc::Statement::getMoreResults | ( | ) |
Check if there are more results available on this statment.
Referenced by ODBCStatement::GetMoreResults(), ODBCPreparedStatement::GetMoreResults(), and ODBCCallableStatement::GetMoreResults().
int odbc::Statement::getQueryTimeout | ( | ) |
Get the query timeout for this statement
Referenced by ODBCStatement::GetQueryTimeout(), ODBCPreparedStatement::GetQueryTimeout(), and ODBCCallableStatement::GetQueryTimeout().
ResultSet* odbc::Statement::getResultSet | ( | ) |
Fetch the current result as a ResultSet
Referenced by ODBCStatement::GetResultSet(), ODBCPreparedStatement::GetResultSet(), and ODBCCallableStatement::GetResultSet().
|
inline |
Get the concurrency type for resultsets created by this statement
Definition at line 217 of file statement.h.
View newest version in sPHENIX GitHub at line 217 of file statement.h
Referenced by ODBCStatement::GetResultSetConcurrency(), ODBCPreparedStatement::GetResultSetConcurrency(), and ODBCCallableStatement::GetResultSetConcurrency().
|
inline |
Get the type for resultsets created by this statement
Definition at line 222 of file statement.h.
View newest version in sPHENIX GitHub at line 222 of file statement.h
Referenced by ODBCStatement::GetResultSetType(), ODBCPreparedStatement::GetResultSetType(), and ODBCCallableStatement::GetResultSetType().
int odbc::Statement::getUpdateCount | ( | ) |
Fetch the current result as an update count.
-1
if the result is a ResultSet or if there are no more results. Referenced by ODBCStatement::GetUpdateCount(), ODBCPreparedStatement::GetUpdateCount(), and ODBCCallableStatement::GetUpdateCount().
void odbc::Statement::setCursorName | ( | const ODBCXX_STRING & | name | ) |
Set the cursor name for this statement
Referenced by ODBCStatement::SetCursorName(), ODBCPreparedStatement::SetCursorName(), and ODBCCallableStatement::SetCursorName().
void odbc::Statement::setEscapeProcessing | ( | bool | on | ) |
Sets escape processing on or off
For PreparedStatement
s, the command has been parsed on creation, so this setting won't really have any effect.
Referenced by ODBCStatement::SetEscapeProcessing(), ODBCPreparedStatement::SetEscapeProcessing(), and ODBCCallableStatement::SetEscapeProcessing().
void odbc::Statement::setFetchSize | ( | int | size | ) |
Set the current fetch size for resultsets created by this statement
void odbc::Statement::setMaxFieldSize | ( | int | maxFieldSize | ) |
Set the maximum field size for resultsets create by this statement
Referenced by ODBCStatement::SetMaxFieldSize(), ODBCPreparedStatement::SetMaxFieldSize(), and ODBCCallableStatement::SetMaxFieldSize().
void odbc::Statement::setMaxRows | ( | int | maxRows | ) |
Set the maximum number of rows to return in a resultset
Referenced by ODBCStatement::SetMaxRows(), ODBCPreparedStatement::SetMaxRows(), and ODBCCallableStatement::SetMaxRows().
void odbc::Statement::setQueryTimeout | ( | int | seconds | ) |
Set the query timeout for this statement
Referenced by ODBCStatement::SetQueryTimeout(), ODBCPreparedStatement::SetQueryTimeout(), and ODBCCallableStatement::SetQueryTimeout().
|
friend |
Definition at line 37 of file statement.h.
View newest version in sPHENIX GitHub at line 37 of file statement.h
|
friend |
Definition at line 39 of file statement.h.
View newest version in sPHENIX GitHub at line 39 of file statement.h
|
friend |
Definition at line 38 of file statement.h.
View newest version in sPHENIX GitHub at line 38 of file statement.h
|
private |
Definition at line 65 of file statement.h.
View newest version in sPHENIX GitHub at line 65 of file statement.h
|
protected |
Definition at line 42 of file statement.h.
View newest version in sPHENIX GitHub at line 42 of file statement.h
|
private |
Definition at line 51 of file statement.h.
View newest version in sPHENIX GitHub at line 51 of file statement.h
|
private |
Definition at line 53 of file statement.h.
View newest version in sPHENIX GitHub at line 53 of file statement.h
|
protected |
Definition at line 43 of file statement.h.
View newest version in sPHENIX GitHub at line 43 of file statement.h
|
protected |
Definition at line 44 of file statement.h.
View newest version in sPHENIX GitHub at line 44 of file statement.h
|
private |
Definition at line 55 of file statement.h.
View newest version in sPHENIX GitHub at line 55 of file statement.h
|
private |
Definition at line 54 of file statement.h.
View newest version in sPHENIX GitHub at line 54 of file statement.h
|
private |
Definition at line 63 of file statement.h.
View newest version in sPHENIX GitHub at line 63 of file statement.h