21 #ifndef ORACLEDATABASE_H
22 #define ORACLEDATABASE_H
24 #include "../Database.h"
25 #include "../ConnectionString.h"
28 #define __MSXML_LIBRARY_DEFINED__
30 #define sleep(x) Sleep( (x)*1000 )
39 #define MAX_DOCUMENT_LENGTH 8000
74 void BeginTransaction(
const bool readonly );
106 DataCommand nonquery( commType, DataCommand::NONQUERY, stringStatement,
false );
108 (void)innerExecuteCommand( nonquery, tempParams, onCursor, 0 );
120 DataCommand nonquery( commType, DataCommand::NONQUERY, stringStatement,
true );
122 (void)innerExecuteCommand( nonquery, tempParams, onCursor, 0 );
135 DataCommand nonquery( commType, DataCommand::NONQUERY, stringStatement,
false );
136 (void)innerExecuteCommand( nonquery, vectorOfParameters, onCursor, 0 );
149 DataCommand nonquery( commType, DataCommand::NONQUERY, stringStatement,
true );
150 (void)innerExecuteCommand( nonquery, vectorOfParameters, onCursor, 0 );
163 DataCommand query( commType, DataCommand::QUERY, stringStatement,
false );
165 return innerExecuteCommand( query, tempParams, onCursor, fetchRows );
179 DataCommand query( commType, DataCommand::QUERY, stringStatement,
false );
180 return innerExecuteCommand( query, vectorOfParameters, onCursor, fetchRows );
193 DataCommand queryCached( commType, DataCommand::QUERY, stringStatement,
true );
195 return innerExecuteCommand( queryCached, tempParams, onCursor, fetchRows );
209 DataCommand queryCached( commType, DataCommand::QUERY, stringStatement,
true );
210 return innerExecuteCommand( queryCached, vectorOfParameters, onCursor, fetchRows );
219 void ReleaseStatement(
const bool isCommandCached,
const string& key );
220 void ReleaseCursor(
const bool checkConn );
256 void BindParams(
const ParametersVector& vectorOfParameters,
const unsigned int startIndex = 1 );
258 DataSet* innerExecuteCommand(
const DataCommand& command,
const ParametersVector& vectorOfParameters,
const bool useCursor =
false,
const unsigned int fetchRows = 0 );
267 DataSet* executeQuery(
DataCommand& command,
const bool isCommandCached,
const bool useCursor );
268 DataSet* getDataSet(
DataCommand& command,
const bool isCommandCached, OCIStmt *statementHandle,
const bool useCursor );
276 void executeNonQuery(
DataCommand& command,
const bool isCommandCached,
const bool useCursor );
289 string getErrorInformation( dvoid *errorHandle, sword status, ub4 handleType = OCI_HTYPE_ERROR,
const bool connCheck =
true );
291 OCIType* getMessageType(
const string& typeName,
const string& userName =
"" );
295 void initXmlContext();
297 string RawToString(
const OCIRaw* value );
298 OCIRaw* StringToRaw(
const string& value );
301 void ClearDateTimestampBinds();
305 #endif // ORACLEDATABASE_H