![]() |
Analysis Software
Documentation for sPHENIX simulation software
|
#include <RDBC/blob/master/include/RDBC/odbc++/callablestatement.h>
Inheritance diagram for odbc::CallableStatement:
Collaboration diagram for odbc::CallableStatement:Public Member Functions | |
| virtual | ~CallableStatement () |
| double | getDouble (int idx) |
| bool | getBoolean (int idx) |
| signed char | getByte (int idx) |
| ODBCXX_BYTES | getBytes (int idx) |
| Date | getDate (int idx) |
| float | getFloat (int idx) |
| int | getInt (int idx) |
| Long | getLong (int idx) |
| short | getShort (int idx) |
| ODBCXX_STRING | getString (int idx) |
| Time | getTime (int idx) |
| Timestamp | getTimestamp (int idx) |
| void | registerOutParameter (int idx, int sqlType) |
| void | registerOutParameter (int idx, int sqlType, int scale) |
| bool | wasNull () |
Public Member Functions inherited from odbc::PreparedStatement | |
| virtual | ~PreparedStatement () |
| void | clearParameters () |
| bool | execute () |
| ResultSet * | executeQuery () |
| int | executeUpdate () |
| bool | execute (const ODBCXX_STRING &) |
| ResultSet * | executeQuery (const ODBCXX_STRING &) |
| int | executeUpdate (const ODBCXX_STRING &) |
| void | setDouble (int idx, double val) |
| void | setBoolean (int idx, bool val) |
| void | setByte (int idx, signed char val) |
| void | setBytes (int idx, const ODBCXX_BYTES &val) |
| void | setDate (int idx, const Date &val) |
| void | setFloat (int idx, float val) |
| void | setInt (int idx, int val) |
| void | setLong (int idx, Long val) |
| void | setShort (int idx, short val) |
| void | setString (int idx, const ODBCXX_STRING &val) |
| void | setTime (int idx, const Time &val) |
| void | setTimestamp (int idx, const Timestamp &val) |
| void | setAsciiStream (int idx, ODBCXX_STREAM *s, int len) |
| void | setBinaryStream (int idx, ODBCXX_STREAM *s, int len) |
| void | setNull (int idx, int sqlType) |
Public Member Functions inherited from odbc::Statement | |
| virtual | ~Statement () |
| Connection * | getConnection () |
| void | cancel () |
| 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 | |
| CallableStatement (Connection *con, SQLHSTMT hstmt, const ODBCXX_STRING &sql, int resultSetType, int resultSetConcurrency) | |
Protected Member Functions inherited from odbc::PreparedStatement | |
| PreparedStatement (Connection *con, SQLHSTMT hstmt, const ODBCXX_STRING &sql, int resultSetType, int resultSetConcurrency, int defaultDirection=SQL_PARAM_INPUT) | |
| void | _bindParams () |
| void | _unbindParams () |
| void | _checkParam (int idx, int *allowed, int numAllowed, int defPrec, int defScale) |
Protected Member Functions inherited from odbc::Statement | |
| 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) | |
Private Attributes | |
| bool | lastWasNull_ |
Friends | |
| class | Connection |
Additional Inherited Members | |
Protected Attributes inherited from odbc::PreparedStatement | |
| ODBCXX_STRING | sql_ |
| Rowset * | rowset_ |
| size_t | numParams_ |
| std::vector< int > | directions_ |
| int | defaultDirection_ |
| bool | paramsBound_ |
A prepared statement suited for stored procedure calls.
A CallableStatement extends the functionality of a PreparedStatement, by allowing output parameters.
The ODBC escapes for calling stored procedures and functions should be used. A procedure call is prepared like this:
CallableStatement* cstmt=con->prepareCall
("{call my_procedure(?,?,?)}");
And for a function call (a procedure that returns a value), the following syntax should be used:
CallableStatement* cstmt=con->prepareCall
("{?=call my_function(?,?)}");
All parameters in a CallableStatement are treated as input/output parameters, unless they are registered as output-only parameters with registerOutParameter(). Note that output-only parameters must be registered with their proper SQL type prior to executing a CallableStatement.
Definition at line 57 of file callablestatement.h.
View newest version in sPHENIX GitHub at line 57 of file callablestatement.h
|
protected |
|
virtual |
Destructor
| bool odbc::CallableStatement::getBoolean | ( | int | idx | ) |
Fetches a parameter as a bool
| idx | The parameter index, starting at 1 |
Referenced by ODBCCallableStatement::GetBoolean().
Here is the caller graph for this function:| signed char odbc::CallableStatement::getByte | ( | int | idx | ) |
Fetches a parameter as a signed char
| idx | The parameter index, starting at 1 |
Referenced by ODBCCallableStatement::GetByte().
Here is the caller graph for this function:| ODBCXX_BYTES odbc::CallableStatement::getBytes | ( | int | idx | ) |
Fetches a parameter as a Bytes object
| idx | The parameter index, starting at 1 |
Referenced by ODBCCallableStatement::GetBytes().
Here is the caller graph for this function:| Date odbc::CallableStatement::getDate | ( | int | idx | ) |
Fetches a parameter as a Date
| idx | The parameter index, starting at 1 |
Referenced by ODBCCallableStatement::GetDate().
Here is the caller graph for this function:| double odbc::CallableStatement::getDouble | ( | int | idx | ) |
Fetches a parameter as a double
| idx | The parameter index, starting at 1 |
Referenced by ODBCCallableStatement::GetDouble().
Here is the caller graph for this function:| float odbc::CallableStatement::getFloat | ( | int | idx | ) |
Fetches a parameter as a float
| idx | The parameter index, starting at 1 |
Referenced by ODBCCallableStatement::GetFloat().
Here is the caller graph for this function:| int odbc::CallableStatement::getInt | ( | int | idx | ) |
Fetches a parameter as an int
| idx | The parameter index, starting at 1 |
Referenced by ODBCCallableStatement::GetInt().
Here is the caller graph for this function:| Long odbc::CallableStatement::getLong | ( | int | idx | ) |
Fetches a parameter as a Long
| idx | The parameter index, starting at 1 |
Referenced by ODBCCallableStatement::GetLong().
Here is the caller graph for this function:| short odbc::CallableStatement::getShort | ( | int | idx | ) |
Fetches a parameter as a short
| idx | The parameter index, starting at 1 |
Referenced by ODBCCallableStatement::GetShort().
Here is the caller graph for this function:| ODBCXX_STRING odbc::CallableStatement::getString | ( | int | idx | ) |
Fetches a parameter as a string
| idx | The parameter index, starting at 1 |
Referenced by ODBCCallableStatement::GetString().
Here is the caller graph for this function:| Time odbc::CallableStatement::getTime | ( | int | idx | ) |
Fetches a parameter as a Time
| idx | The parameter index, starting at 1 |
Referenced by ODBCCallableStatement::GetTime().
Here is the caller graph for this function:| Timestamp odbc::CallableStatement::getTimestamp | ( | int | idx | ) |
Fetches a parameter as a Timestamp
| idx | The parameter index, starting at 1 |
Referenced by ODBCCallableStatement::GetTimestamp().
Here is the caller graph for this function:
|
inline |
Registers an output parameter
| idx | The parameter index, starting at 1 |
| sqlType | The SQL type of the parameter |
Definition at line 139 of file callablestatement.h.
View newest version in sPHENIX GitHub at line 139 of file callablestatement.h
Referenced by ODBCCallableStatement::RegisterOutParameter().
Here is the caller graph for this function:| void odbc::CallableStatement::registerOutParameter | ( | int | idx, |
| int | sqlType, | ||
| int | scale | ||
| ) |
Registers an output parameter with a given scale
| idx | The parameter index, starting at 1 |
| sqlType | The SQL type of the parameter |
| scale | The scale of the parameter. |
|
inline |
Returns true if the last fetched parameter was NULL
Definition at line 152 of file callablestatement.h.
View newest version in sPHENIX GitHub at line 152 of file callablestatement.h
Referenced by ODBCCallableStatement::WasNull().
Here is the caller graph for this function:
|
friend |
Definition at line 58 of file callablestatement.h.
View newest version in sPHENIX GitHub at line 58 of file callablestatement.h
|
private |
Definition at line 61 of file callablestatement.h.
View newest version in sPHENIX GitHub at line 61 of file callablestatement.h