#include <Oracle8iCursor.h>
Inheritance diagram for Oracle8iCursor:
Public Member Functions | |
virtual | ~Oracle8iCursor () |
Protected Member Functions | |
Oracle8iCursor (class Connection *connection) | |
virtual bool | _Open () |
virtual bool | _Prepare (const char *const sqlCommand) |
virtual bool | _PreExecBind (const char *varName, const int pos, const void *varAddr, const int varLen, const IopcDataType varType, bool null=false) |
virtual bool | _Execute () |
virtual bool | _PreFetchBind (const int position, const void *varAddr, const int varLen, const IopcDataType varType, bool *null=NULL) |
virtual bool | _FetchNext () |
virtual bool | _FetchPrev () |
virtual long | _Position () |
virtual bool | _Close () |
virtual bool | _PreExecBind (const char *varName, const void *varAddr, const int varLen, const char varType, short *varInd=NULL) |
virtual bool | _PreFetchBind (const int position, const void *varAddr, const int varLen, const char varType, short *varInd=NULL) |
int | processOCIError (int ociRetVal, const char *ociFunctionName, const char *myFunctionName, bool useEnvHandle=0) |
void | clear () |
Static Protected Member Functions | |
ub2 | getVarTypeAndLength (int &varLen, const IopcDataType varType, const void *varAddr, bool preExecBind) |
IopcDataType | oldTypeToIopcType (const char oldType) |
void | logDebugMessage (const char *formatString, const char *param1="", int mask=0) |
Protected Attributes | |
OCIStmt * | stmtHandle |
bool | isSelectStatement |
OCIEnv * | ociEnvironment |
OCIError * | errorHandle |
OCISvcCtx * | serviceContext |
unsigned int | position |
bool * | autoCommit |
std::list< IndicatorStruct > | indicatorVariables |
Friends | |
int | processOCIErrorGlobal (Oracle8iClassType classType, OCIEnv *ociEnvironment, OCIError *errorHandle, sword ociRetVal, const char *ociFunctionName, const char *myFunctionName, bool useEnvHandle) |
Oracle 8i doesn't use cursors for SQL queries processing, It uses statement handles (stmtHandle) instead.
Methods of this class return true if OK, in case of error throw ObjLibException_ConnectionError (if not said something different).
|
Simple constructor.
|
|
Destructor - destroys indicatorVariables.
|
|
"Opens the cursor." Oracle8i doesn't use cursors, statement handle (stmtHandle) is used instead. So this function only initializes some variables. Reimplemented from Cursor. |
|
Prepares
Implements Cursor. |
|
Binds an input variable of previously prepared SQL command. If
Implements Cursor. |
|
Executes SQL statement, that has been already prepared and its input variables (if any) have been bound.
Implements Cursor. |
|
Binds an output variable of executed SQL statement. This function is called once for every output variable in SQL statement -> typically more than once per statement.
Implements Cursor. |
|
Fetches next row for SQL statement, that has been already executed and its output variables have been bound. Implements Cursor. |
|
Fetches previous row - Oracle v. 8i doesn't support this, so this function always throws ObjLibException_NotSupported. Implements Cursor. |
|
Returns actual position in the query - it means how many rows have been already fetched.
Implements Cursor. |
|
"Closes the cursor." Frees statement handle (stmtHandle).
Reimplemented from Cursor. |
|
Obsolete version of _PreExecBind used by POLiTe-style persistent classes. Use _PreExecBind(const char *,const int,const void *,const int,const IopcDataType,bool) instead.
Converts
Implements Cursor. |
|
Obsolete version of _PreFetchBind used by POLiTe-style persistent classes. Use _PreFetchBind(const int,const void *,const int,const IopcDataType,bool *) instead.
Converts
Implements Cursor. |
|
Arbitrary function for error handling - calls processOCIErrorGlobal() passing it given parameters and some class specific values.
|
|
Arbitrary function - returns Oracle external data type of variable specified by arguments and updates length of the variable (
|
|
Convert old (POLiTe style) type specification to IopcDataType. Used by _PreExecBind(const char *const,const int,const void *,const int,const IopcDataType,bool) and _PreFetchBind(const int,const void *,const int,const IopcDataType, bool *). |
|
Clears indicatorVariables - called from _Close() and from destructor.
|
|
Logs (using logmsg()) given message if C_ORACLECURSOR_TRACE is set, otherwise does nothing.
|
|
According to type of
|
|
OCI statement handle - used for SQL statement processing.
|
|
Are we processing a SELECT or some other SQL statement (passed from _Prepare() to _Execute() for setting parameter 'iters' in OCIStmtExecute())? |
|
Pointer to OCI Environment handle (see OciEnvCreate() in Oracle documentation).
|
|
Pointer to OCI Error handle to be passed to OCIErrorGet() for diagnostic information in the event of an error.
|
|
The service context pointer.
|
|
Position of cursor in query results (how many rows have been already fetched).
|
|
Perform autocommit ? (Pointer to Oracle8iConnection::autoCommit.).
|
|
Used to set bool given as parameter |