#include <Ccdb_Statement.h>
Public Member Functions | |
virtual | ~Statement () |
void | AddBatch () |
void | AddBatch (const dtSTRING *SQLStatement) |
dtRtnStatus | BindInputParameter (dtLARGE, const dtSTRING *, dtTINY *=NULL) |
dtRtnStatus | BindInputParameter (dtLARGE, void *, dtULARGE, dtTINY *=NULL) |
dtRtnStatus | BindInputParameter (dtLARGE, void *, dtULARGE, dtUTINY, dtTINY *=NULL) |
template<class T > | |
dtRtnStatus | BindInputParameter (dtLARGE number, T &value, dtTINY *indicator=NULL) |
dtRtnStatus | BindInOutParameter (dtLARGE, dtSTRING *, dtULARGE, dtTINY *=NULL) |
dtRtnStatus | BindInOutParameter (dtLARGE, dtUSTRING *, dtULARGE, dtTINY *=NULL) |
dtRtnStatus | BindInOutParameter (dtLARGE, void *, dtULARGE, dtTINY *=NULL) |
dtRtnStatus | BindInOutParameter (dtLARGE, void *, dtULARGE, dtUTINY, dtTINY *=NULL) |
template<class T > | |
dtRtnStatus | BindInOutParameter (dtLARGE number, T &value, dtTINY *indicator=NULL) |
dtRtnStatus | BindOutputParameter (dtLARGE, dtSTRING *, dtULARGE, dtTINY *=NULL) |
dtRtnStatus | BindOutputParameter (dtLARGE, dtUSTRING *, dtULARGE, dtTINY *=NULL) |
dtRtnStatus | BindOutputParameter (dtLARGE, void *, dtULARGE, dtTINY *=NULL) |
dtRtnStatus | BindOutputParameter (dtLARGE, void *, dtULARGE, dtUTINY, dtTINY *=NULL) |
template<class T > | |
dtRtnStatus | BindOutputParameter (dtLARGE number, T &value, dtTINY *indicator=NULL) |
dtRtnStatus | BindReturnParameter (dtLARGE, dtSTRING *, dtULARGE, dtTINY *=NULL) |
dtRtnStatus | BindReturnParameter (dtLARGE, dtUSTRING *, dtULARGE, dtTINY *=NULL) |
dtRtnStatus | BindReturnParameter (dtLARGE, void *, dtULARGE, dtTINY *=NULL) |
dtRtnStatus | BindReturnParameter (dtLARGE, void *, dtULARGE, dtUTINY, dtTINY *=NULL) |
template<class T > | |
dtRtnStatus | BindReturnParameter (dtLARGE number, T &value, dtTINY *indicator=NULL) |
dtRtnStatus | Cancel () |
void | ClearBatch () |
void | Close () |
ResultSet * | Execute () |
cdbBatchRowCount_t * | ExecuteBatch () |
ResultSet * | ExecDirect (dtSTRING *) |
dtULARGE | GetFetchSize () |
dtULARGE | GetMaxRows () |
const dtSTRING * | GetName () |
dtLARGE | GetNumberParameters () |
dtULARGE | GetNumberResultColumns () |
dtLARGE | GetRowCount () |
dtBOOLEAN | IsOpen () |
ResultSet * | MoreResults () |
dtRtnStatus | Prepare (dtSTRING const *) |
dtRtnStatus | SetFetchSize (dtULARGE) |
dtRtnStatus | SetMaxRows (dtULARGE) |
dtRtnStatus | SetName (const dtSTRING *) |
void | UnbindParameters () |
Public Member Functions inherited from dbSpaces::dbcli::cdbBase | |
cdbBase (cdbBase *, ccdbClassType, dtBOOLEAN=TRUE) | |
virtual | ~cdbBase () |
cdb_childList_t & | GetChildList () |
Ccoms_CommsManager * | GetTransportComms () |
ccdbClassType | GetType () |
void | SetTransportComms (Ccoms_CommsManager *) |
Protected Member Functions | |
Statement () | |
A Statement object is used for executing a static/dynamic SQL statement and obtaining the results produced by it.
Only one ResultSet per Statement can be open at any point in time. Therefore, if the reading of one ResultSet is interleaved with the reading of another, each must have been generated by different Statements. All statement execute methods implicitly close a statment's current ResultSet if an open one exists.
A DatabaseException will be thrown if a database error occurs and exceptions are enabled. If exceptions are not enabled the following error methods can be used to get information about the error;
|
protected |
Statement default constructor.
|
virtual |
void dbSpaces::dbcli::Statement::AddBatch | ( | ) |
Allows a new dynamic statement to be added to a SQL Batch of statements. After calling this method call Prepare() to setup the next batch SQL statement.
void dbSpaces::dbcli::Statement::AddBatch | ( | const dtSTRING * | SQLStatement | ) |
Allows a new static SQL statement to be added to the SQL Batch.
SQLStatement | The SQL Statement to add to batch. |
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
dtRtnStatus dbSpaces::dbcli::Statement::BindInOutParameter | ( | dtLARGE | , |
dtSTRING * | , | ||
dtULARGE | , | ||
dtTINY * | = NULL |
||
) |
Bind a program's local variable as a dynamic parameter for both input and output.
number | The first parameter is 1, the second is 2, ... |
value | Value address. |
indicator | Indicator(s) address used to indicate NOT NULL or NULL data. Possible indicator values are;
|
dtRtnStatus dbSpaces::dbcli::Statement::BindInOutParameter | ( | dtLARGE | , |
dtUSTRING * | , | ||
dtULARGE | , | ||
dtTINY * | = NULL |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
dtRtnStatus dbSpaces::dbcli::Statement::BindInOutParameter | ( | dtLARGE | , |
void * | , | ||
dtULARGE | , | ||
dtTINY * | = NULL |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
dtRtnStatus dbSpaces::dbcli::Statement::BindInOutParameter | ( | dtLARGE | , |
void * | , | ||
dtULARGE | , | ||
dtUTINY | , | ||
dtTINY * | = NULL |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
dtRtnStatus dbSpaces::dbcli::Statement::BindInputParameter | ( | dtLARGE | , |
const dtSTRING * | , | ||
dtTINY * | = NULL |
||
) |
Bind a program's local variable as a dynamic parameter for input only.
number | The first parameter is 1, the second is 2, ... |
value | Value(s) address. |
indicator | Indicator(s) address used to indicate NOT NULL or NULL data. Possible indicator values are;
|
dtRtnStatus dbSpaces::dbcli::Statement::BindInputParameter | ( | dtLARGE | , |
void * | , | ||
dtULARGE | , | ||
dtTINY * | = NULL |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
dtRtnStatus dbSpaces::dbcli::Statement::BindInputParameter | ( | dtLARGE | , |
void * | , | ||
dtULARGE | , | ||
dtUTINY | , | ||
dtTINY * | = NULL |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
dtRtnStatus dbSpaces::dbcli::Statement::BindOutputParameter | ( | dtLARGE | , |
dtSTRING * | , | ||
dtULARGE | , | ||
dtTINY * | = NULL |
||
) |
Bind a program's local variable as a dynamic parameter for output only.
number | The first parameter is 1, the second is 2, ... |
value | Value address for output. |
indicator | Indicator(s) address used to indicate NOT NULL or NULL data. Possible indicator values are;
|
dtRtnStatus dbSpaces::dbcli::Statement::BindOutputParameter | ( | dtLARGE | , |
dtUSTRING * | , | ||
dtULARGE | , | ||
dtTINY * | = NULL |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
dtRtnStatus dbSpaces::dbcli::Statement::BindOutputParameter | ( | dtLARGE | , |
void * | , | ||
dtULARGE | , | ||
dtTINY * | = NULL |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
dbSpaces::dbcli::Statement::BindOutputParameter | ( | dtLARGE | , |
void * | , | ||
dtULARGE | , | ||
dtUTINY | , | ||
dtTINY * | = NULL |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
dtRtnStatus dbSpaces::dbcli::Statement::BindReturnParameter | ( | dtLARGE | , |
dtSTRING * | , | ||
dtULARGE | , | ||
dtTINY * | = NULL |
||
) |
Bind a program's local variable as a dynamic parameter for the return value.
number | The return parameter should be 1. |
value | Value address for output. |
indicator | Indicator(s) address used to indicate NOT NULL or NULL data. Possible indicator values are;
|
dtRtnStatus dbSpaces::dbcli::Statement::BindReturnParameter | ( | dtLARGE | , |
dtUSTRING * | , | ||
dtULARGE | , | ||
dtTINY * | = NULL |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
dtRtnStatus dbSpaces::dbcli::Statement::BindReturnParameter | ( | dtLARGE | , |
void * | , | ||
dtULARGE | , | ||
dtTINY * | = NULL |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
dtRtnStatus dbSpaces::dbcli::Statement::BindReturnParameter | ( | dtLARGE | , |
void * | , | ||
dtULARGE | , | ||
dtUTINY | , | ||
dtTINY * | = NULL |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
dtRtnStatus dbSpaces::dbcli::Statement::Cancel | ( | ) |
Cancel the execution of the statement.
DatabaseException | (if exceptions are enabled) when a database error occurs. |
void dbSpaces::dbcli::Statement::ClearBatch | ( | ) |
void dbSpaces::dbcli::Statement::Close | ( | ) |
Close the statement in the server. Frees any held resources locally and in the server.
DatabaseException | (if exceptions are enabled) when a database error occurs. |
ResultSet * dbSpaces::dbcli::Statement::ExecDirect | ( | dtSTRING * | ) |
Execute a SQL statement immediately without first preparing and then executing it.
SQLStatement | The SQL statement to execute. |
DatabaseException | (if exceptions are enabled) when a database error occurs. |
ResultSet * dbSpaces::dbcli::Statement::Execute | ( | ) |
cdbBatchRowCount_t * dbSpaces::dbcli::Statement::ExecuteBatch | ( | ) |
Execute the current batch of SQL statements. A List containing the rows processed for each statement executed is returned.
cdbBatchRowCount_t
object. DatabaseException | (if exceptions are enabled) when a database error occurs. |
dtULARGE dbSpaces::dbcli::Statement::GetFetchSize | ( | ) |
Get the fetch size for returning rows with the ResultSet object.
dtULARGE dbSpaces::dbcli::Statement::GetMaxRows | ( | ) |
Get the maximum rows that can be returned for this Statement.
const dtSTRING * dbSpaces::dbcli::Statement::GetName | ( | ) |
dtLARGE dbSpaces::dbcli::Statement::GetNumberParameters | ( | ) |
Get the number of dynamic parameters for the current SQL statement.
DatabaseException | (if exceptions are enabled) when a database error occurs. |
dtULARGE dbSpaces::dbcli::Statement::GetNumberResultColumns | ( | ) |
Get the number of result columns in the ResultSet
object.
DatabaseException | (if exceptions are enabled) when a database error occurs. |
dtLARGE dbSpaces::dbcli::Statement::GetRowCount | ( | ) |
Get the row count for the number of rows processed for either an insert, delete or update request.
dtBOOLEAN dbSpaces::dbcli::Statement::IsOpen | ( | ) |
ResultSet * dbSpaces::dbcli::Statement::MoreResults | ( | ) |
dtRtnStatus dbSpaces::dbcli::Statement::Prepare | ( | dtSTRING const * | ) |
dtRtnStatus dbSpaces::dbcli::Statement::SetFetchSize | ( | dtULARGE | ) |
Set the fetch size for the number of rows returned to the ResultSet object.
size | The new fetch size. |
DatabaseException | (if exceptions are enabled) when a database error occurs. |
dtRtnStatus dbSpaces::dbcli::Statement::SetMaxRows | ( | dtULARGE | ) |
Set the maximum rows that can be returned from a query.
maxRows | The new maximum number of rows. |
DatabaseException | (if exceptions are enabled) when a database error occurs. |
dtRtnStatus dbSpaces::dbcli::Statement::SetName | ( | const dtSTRING * | ) |
Set the cursor name for the Statement. The name must be unique and not already exist for another Statement.
cursorName | The name for the cursor. |
DatabaseException | (if exceptions are enabled) when a database error occurs. |
void dbSpaces::dbcli::Statement::UnbindParameters | ( | ) |
Unbind any parameters that have been previously bound.