dbc/ZDbcOracleUtils.pas File Reference

Go to the source code of this file.

Classes

struct  TZSQLVar
 Declares SQL Object. More...
struct  TZSQLVars

Typedefs

typedef TZSQLVarPZSQLVar
typedef TZSQLVarsPZSQLVars

Functions

 AllocateOracleSQLVars (PZSQLVars &Variables, Integer Count)
 Allocates memory for Oracle SQL Variables.
 AllocateOracleStatementHandles (IZOraclePlainDriver PlainDriver, IZConnection Connection, POCIStmt &Handle, POCIError &ErrorHandle)
 Allocates in memory Oracle handlers for Statement object.
Integer CalculateSQLVarsSize (Integer Count)
 Calculates size of SQLVars record.
 CheckOracleError (IZOraclePlainDriver PlainDriver, POCIError ErrorHandle, Integer Status, TZLoggingCategory LogCategory, string LogMessage)
 Checks for possible SQL errors.
TZSQLType ConvertMySQLHandleToSQLType (IZMySQLPlainDriver PlainDriver, PZMySQLField FieldHandle, Integer FieldFlags)
 Silent exception.
TZSQLType ConvertOracleTypeToSQLType (string TypeName, Integer Size, Integer Precision)
 Converts a MySQL native types into ZDBC SQL types.
IZResultSet CreateOracleResultSet (IZOraclePlainDriver PlainDriver, IZStatement Statement, string SQL, POCIStmt Handle, POCIError ErrorHandle)
 Creates an Oracle result set based on the current settings.
 ExecuteOracleStatement (IZOraclePlainDriver PlainDriver, IZConnection Connection, string SQL, POCIStmt Handle, POCIError ErrorHandle)
 Executes an Oracle statement.
 FreeOracleSQLVars (IZOraclePlainDriver PlainDriver, PZSQLVars &Variables)
 Frees memory Oracle SQL Variables from the memory.
 FreeOracleStatementHandles (IZOraclePlainDriver PlainDriver, POCIStmt &Handle, POCIError &ErrorHandle)
 Frees from memory Oracle handlers for Statement object.
ub4 GetOracleUpdateCount (IZOraclePlainDriver PlainDriver, POCIStmt Handle, POCIError ErrorHandle)
 Gets a number of updates made by executed Oracle statement.
 InitializeOracleVar (IZOraclePlainDriver PlainDriver, IZConnection Connection, PZSQLVar &Variable, TZSQLType DataType, ub2 OracleType, Integer DataSize)
 Allocates in memory and initializes the Oracle variable.
 LoadOracleVars (IZOraclePlainDriver PlainDriver, IZConnection Connection, POCIError ErrorHandle, PZSQLVars Variables, TZVariantDynArray Values)
 Loads Oracle variables binded to SQL statement with data.
TDateTime OraDateToDateTime (PChar Value)
 Converts Oracle internal date into TDateTime.
 PrepareOracleStatement (IZOraclePlainDriver PlainDriver, string SQL, POCIStmt Handle, POCIError ErrorHandle)
 Prepares an Oracle statement.
 UnloadOracleVars (PZSQLVars Variables)
 Unloads Oracle variables binded to SQL statement with data.

Variables

const MAX_SQLVAR_LIMIT = 1024


Typedef Documentation

typedef TZSQLVar* PZSQLVar

Definition at line 106 of file ZDbcOracleUtils.pas.

typedef TZSQLVars* PZSQLVars

Definition at line 120 of file ZDbcOracleUtils.pas.


Function Documentation

AllocateOracleSQLVars ( PZSQLVars Variables,
Integer  Count 
)

Allocates memory for Oracle SQL Variables.

Parameters:
Variables a pointer to array of variables.
Count a number of SQL variables.

Definition at line 350 of file ZDbcOracleUtils.pas.

AllocateOracleStatementHandles ( IZOraclePlainDriver  PlainDriver,
IZConnection  Connection,
POCIStmt Handle,
POCIError ErrorHandle 
)

Allocates in memory Oracle handlers for Statement object.

Parameters:
PlainDriver an Oracle plain driver.
Connection an Oracle connection object.
Handle a holder for Statement handle.
ErrorHandle a holder for Error handle.

Integer CalculateSQLVarsSize ( Integer  Count  ) 

Calculates size of SQLVars record.

Parameters:
Count a number of variable.
Returns:
a record size.

Definition at line 336 of file ZDbcOracleUtils.pas.

CheckOracleError ( IZOraclePlainDriver  PlainDriver,
POCIError  ErrorHandle,
Integer  Status,
TZLoggingCategory  LogCategory,
string  LogMessage 
)

Checks for possible SQL errors.

Parameters:
PlainDriver an Oracle plain driver.
Handle an Oracle error handle.
Status a command return status.
LogCategory a logging category.
LogMessage a logging message.

TZSQLType ConvertMySQLHandleToSQLType ( IZMySQLPlainDriver  PlainDriver,
PZMySQLField  FieldHandle,
Integer  FieldFlags 
)

Silent exception.

Converts a MySQL native types into ZDBC SQL types.

Converts a MySQL native types into ZDBC SQL types.

Parameters:
PlainDriver a native MySQL plain driver.
FieldHandle a handler to field description structure.
FieldFlags field flags.
Returns:
a SQL undepended type.
Parameters:
PlainDriver a native MySQL plain driver.
FieldHandle a handler to field description structure.
FieldFlags a field flags.
Returns:
a SQL undepended type.

Definition at line 601 of file ZDbcOracleUtils.pas.

*TZSQLType ConvertOracleTypeToSQLType ( string  TypeName,
Integer  Size,
Integer  Precision 
)

Converts a MySQL native types into ZDBC SQL types.

Convert string Oracle field type to SQLType.

Parameters:
PlainDriver a native MySQL plain driver.
FieldHandle a handler to field description structure.
FieldFlags field flags.
Returns:
a SQL undepended type. Convert string Oracle field type to SQLType
Parameters:
string field type value
Returns:
the SQLType field type value
Parameters:
string field type value
Returns:
the SQLType field type value

Definition at line 664 of file ZDbcOracleUtils.pas.

IZResultSet CreateOracleResultSet ( IZOraclePlainDriver  PlainDriver,
IZStatement  Statement,
string  SQL,
POCIStmt  Handle,
POCIError  ErrorHandle 
)

Creates an Oracle result set based on the current settings.

Returns:
a created result set object.

ExecuteOracleStatement ( IZOraclePlainDriver  PlainDriver,
IZConnection  Connection,
string  SQL,
POCIStmt  Handle,
POCIError  ErrorHandle 
)

Executes an Oracle statement.

Parameters:
PlainDriver an Oracle plain driver.
Connection an Oracle connection Object.
SQL an SQL query to be prepared.
Handle a holder for Statement handle.
ErrorHandle a holder for Error handle.

FreeOracleSQLVars ( IZOraclePlainDriver  PlainDriver,
PZSQLVars Variables 
)

Frees memory Oracle SQL Variables from the memory.

Parameters:
PlainDriver an Oracle plain driver.
Variables a pointer to array of variables.

Definition at line 379 of file ZDbcOracleUtils.pas.

FreeOracleStatementHandles ( IZOraclePlainDriver  PlainDriver,
POCIStmt Handle,
POCIError ErrorHandle 
)

Frees from memory Oracle handlers for Statement object.

Parameters:
PlainDriver an Oracle plain driver.
Handle a holder for Statement handle.
ErrorHandle a holder for Error handle.

ub4 GetOracleUpdateCount ( IZOraclePlainDriver  PlainDriver,
POCIStmt  Handle,
POCIError  ErrorHandle 
)

Gets a number of updates made by executed Oracle statement.

Parameters:
PlainDriver an Oracle plain driver.
Handle a holder for Statement handle.
ErrorHandle a holder for Error handle.
Returns:
a number of updates.

InitializeOracleVar ( IZOraclePlainDriver  PlainDriver,
IZConnection  Connection,
PZSQLVar Variable,
TZSQLType  DataType,
ub2  OracleType,
Integer  DataSize 
)

Allocates in memory and initializes the Oracle variable.

Parameters:
PlainDriver an Oracle plain driver.
Connection an Oracle connection Object.
Variable an Oracle variable holder.
DataType a DBC data type.
OracleType a correspondent Oracle type.
DataSize a length for string variables.

Definition at line 420 of file ZDbcOracleUtils.pas.

LoadOracleVars ( IZOraclePlainDriver  PlainDriver,
IZConnection  Connection,
POCIError  ErrorHandle,
PZSQLVars  Variables,
TZVariantDynArray  Values 
)

Loads Oracle variables binded to SQL statement with data.

Parameters:
PlainDriver an Oracle plain driver.
Connection an Oracle connection Object.
Variables Oracle variable holders.
Values a values to be loaded.

Definition at line 492 of file ZDbcOracleUtils.pas.

TDateTime OraDateToDateTime ( PChar  Value  ) 

Converts Oracle internal date into TDateTime.

Parameters:
Value a pointer to Oracle internal date.
Returns:
a decoded TDateTime value.

PrepareOracleStatement ( IZOraclePlainDriver  PlainDriver,
string  SQL,
POCIStmt  Handle,
POCIError  ErrorHandle 
)

Prepares an Oracle statement.

Parameters:
PlainDriver an Oracle plain driver.
SQL an SQL query to be prepared.
Handle a holder for Statement handle.
ErrorHandle a holder for Error handle.

UnloadOracleVars ( PZSQLVars  Variables  ) 

Unloads Oracle variables binded to SQL statement with data.

Parameters:
Variables Oracle variable holders.

Definition at line 572 of file ZDbcOracleUtils.pas.


Variable Documentation

const MAX_SQLVAR_LIMIT = 1024

Definition at line 70 of file ZDbcOracleUtils.pas.


Generated on Wed Dec 30 08:42:42 2009 for zeoslib by  doxygen 1.5.7.1