|
virtual | ~CallableStatement () |
| Destructor.
|
|
double | getDouble (int idx) |
| Fetches a parameter as a double. More...
|
|
bool | getBoolean (int idx) |
| Fetches a parameter as a bool. More...
|
|
signed char | getByte (int idx) |
| Fetches a parameter as a signed char. More...
|
|
Bytes | getBytes (int idx) |
| Fetches a parameter as a Bytes object. More...
|
|
Date | getDate (int idx) |
| Fetches a parameter as a Date. More...
|
|
float | getFloat (int idx) |
| Fetches a parameter as a float. More...
|
|
int | getInt (int idx) |
| Fetches a parameter as an int. More...
|
|
Long | getLong (int idx) |
| Fetches a parameter as a Long. More...
|
|
short | getShort (int idx) |
| Fetches a parameter as a short. More...
|
|
std::string | getString (int idx) |
| Fetches a parameter as a string. More...
|
|
Time | getTime (int idx) |
| Fetches a parameter as a Time. More...
|
|
Timestamp | getTimestamp (int idx) |
| Fetches a parameter as a Timestamp. More...
|
|
void | registerOutParameter (int idx, int sqlType) |
| Registers an output parameter. More...
|
|
void | registerOutParameter (int idx, int sqlType, int scale) |
| Registers an output parameter with a given scale. More...
|
|
void | registerInParameter (int idx) |
| Registers an input only parameter. More...
|
|
bool | wasNull () |
| Returns true if the last fetched parameter was NULL.
|
|
virtual | ~PreparedStatement () |
| Destructor.
|
|
void | clearParameters () |
| Clears the parameters. More...
|
|
bool | execute () |
| Executes this statement. More...
|
|
ResultSet * | executeQuery () |
| Executes this statement, assuming it returns a ResultSet. More...
|
|
int | executeUpdate () |
| Executes this statement, assuming it returns an update count.
|
|
void | setDouble (int idx, double val) |
| Sets a parameter value to a double. More...
|
|
void | setBoolean (int idx, bool val) |
| Sets a parameter value to a bool. More...
|
|
void | setByte (int idx, signed char val) |
| Sets a parameter value to signed char. More...
|
|
void | setBytes (int idx, const Bytes &val) |
| Sets a parameter value to a chunk of bytes. More...
|
|
void | setDate (int idx, const Date &val) |
| Sets a parameter value to a Date. More...
|
|
void | setFloat (int idx, float val) |
| Sets a parameter value to a float. More...
|
|
void | setInt (int idx, int val) |
| Sets a parameter value to an int. More...
|
|
void | setLong (int idx, Long val) |
| Sets a parameter value to a Long. More...
|
|
void | setShort (int idx, short val) |
| Sets a parameter value to a short. More...
|
|
void | setString (int idx, const std::string &val) |
| Sets a parameter value to a string. More...
|
|
void | setTime (int idx, const Time &val) |
| Sets a parameter value to a Time. More...
|
|
void | setTimestamp (int idx, const Timestamp &val) |
| Sets a parameter value to a Timestamp. More...
|
|
void | setAsciiStream (int idx, std::istream *s, int len) |
| Sets a parameter value to an ascii stream. More...
|
|
void | setBinaryStream (int idx, std::istream *s, int len) |
| Sets a parameter value to a binary stream. More...
|
|
void | setNull (int idx, int sqlType) |
| Sets a parameter value to NULL. More...
|
|
virtual | ~Statement () |
| Destructor. More...
|
|
Connection * | getConnection () |
| Returns the connection that created this statement.
|
|
void | cancel () |
| Cancel an ongoing operation that was executed in another thread.
|
|
virtual bool | execute (const std::string &sql) |
| Execute a given SQL statement. More...
|
|
virtual ResultSet * | executeQuery (const std::string &sql) |
| Execute an SQL statement, expected to return a resultset. More...
|
|
virtual int | executeUpdate (const std::string &sql) |
| Execute an SQL statement, expected to return an update count. More...
|
|
int | getUpdateCount () |
| Fetch the current result as an update count. More...
|
|
ResultSet * | getResultSet () |
| Fetch the current result as a ResultSet.
|
|
bool | getMoreResults () |
| Check if there are more results available on this statment. More...
|
|
void | setCursorName (const std::string &name) |
| Set the cursor name for this statement.
|
|
int | getFetchSize () |
| Fetch the current fetch size (also called rowset size) for resultsets created by this statement.
|
|
void | setFetchSize (int size) |
| Set the current fetch size for resultsets created by this statement.
|
|
int | getResultSetConcurrency () |
| Get the concurrency type for resultsets created by this statement.
|
|
int | getResultSetType () |
| Get the type for resultsets created by this statement.
|
|
int | getQueryTimeout () |
| Get the query timeout for this statement.
|
|
void | setQueryTimeout (int seconds) |
| Set the query timeout for this statement.
|
|
int | getMaxRows () |
| Get the maximum number of rows to return in a resultset.
|
|
void | setMaxRows (int maxRows) |
| Set the maximum number of rows to return in a resultset.
|
|
int | getMaxFieldSize () |
| Get the maximum field size for resultsets create by this statement.
|
|
void | setMaxFieldSize (int maxFieldSize) |
| Set the maximum field size for resultsets create by this statement.
|
|
void | setEscapeProcessing (bool on) |
| Sets escape processing on or off. More...
|
|
bool | getEscapeProcessing () |
| Gets the current escape processing setting. More...
|
|
void | close () |
| Closes all result sets from this execution. More...
|
|
Public Member Functions inherited from odbc::ErrorHandler |
void | clearWarnings () |
| Clears all the warnings stored in this object.
|
|
WarningList * | getWarnings () |
| Fetches all the warnings in this object. More...
|
|
virtual | ~ErrorHandler () |
| Destructor.
|
|
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:
std::auto_ptr<CallableStatement> cstmt(con->prepareCall
("{call my_procedure(?,?,?)}"));
And for a function call (a procedure that returns a value), the following syntax should be used:
std::auto_ptr<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
.