Qore oracle Module  ..
OracleExtensions::OracleSQLStatement Class Reference

Oracle specific SQLStatement variant with Application Info capabilities. More...

Inheritance diagram for OracleExtensions::OracleSQLStatement:
OracleExtensions::OracleInstrumentationBase

Public Member Methods

 constructor (Qore::SQL::Datasource ds, *code userAutoInfo)
 Constructor taking standard Datasource. More...
 
 constructor (Qore::SQL::DatasourcePool ds, *code userAutoInfo)
 Constructor taking standard DatasourcePool. More...
 
 constructor (OracleExtensions::OracleDatasource ds)
 Constructor taking OracleDatasource. More...
 
 constructor (OracleExtensions::OracleDatasourcePool ds)
 Constructor taking OracleDatasourcePool. More...
 
 setAppInfoCallback (*string oraclient, *string oramodule, *string oraaction)
 Set app info by wrapped Datasource/Pool object.
 
bool currentThreadInTransaction ()
 A backend provided m_ds.currentThreadInTransaction() for wrappeed Datasource/Pool.
 
nothing exec ()
 SQLStatement::exec with Automatic Application Info.
 
nothing execArgs (softlist vargs)
 SQLStatement::execArgs with Automatic Application Info.
 
bool next ()
 SQLStatement::next with Automatic Application Info.
 
nothing commit ()
 SQLStatement::commit with clearing of Automatic Application Info if required.
 
nothing rollback ()
 SQLStatement::rollback with clearing of Automatic Application Info if required.
 
- Public Member Methods inherited from OracleExtensions::OracleInstrumentationBase
bool setAutomaticDBInfo (*OracleExtensions::OracleApplicationInfo item, bool checkTransaction=True)
 Obtain info about transaction capturing and try to get available Application Info. More...
 
 setAppInfo (*OracleExtensions::OracleApplicationInfo audit, bool fromSystem=True)
 Set the explicit Application Info. The transaction lock is taken. More...
 
 setAppInfo (*string client, *string module, *string action, bool fromSystem=True)
 An overloaded method with the same functionality as the OracleExtensions::OracleApplicationInfo variant.
 

Additional Inherited Members

- Private Attributes inherited from OracleExtensions::OracleInstrumentationBase
*OracleExtensions::OracleApplicationInfo userInfo
 potential user Application Info set by beginTransaction or explicit call of setAppInfo
 
*code autoCode
 user code used in setAutomaticDBInfo when there is no OracleApplicationInfo value provided
 
object m_ds
 Internally used datasource/pool.
 

Detailed Description

Oracle specific SQLStatement variant with Application Info capabilities.

Note
Consult Qore::SQL::SQLStatement for its special transaction handling

OracleSQLStatement can take standard Qore Datasource/Pool or OracleDatasource/Pool on input. The Automatic Application Info handling is processed as follow:

Example where the Auto Info goes from Oracle specialized datasource

getAutoInfo() is shared in all examples in the OracleExtension documentation. All constructor standard arguments are ellipsed with "..." in these examples.

Both examples below result in the same behavior in the Oracle server.

OracleExtensions::OracleDatasource dd(..., \getAutoInfo());
OracleSQLStatement stmt(dd);
stmt.prepare("select * from foo");
while (stmt.next())
process_row(stmt.fetchRow());
# remember the SQLStatement transaction handling
stmt.commit();
OracleDatasource class implementation.
Definition: OracleExtensions.qm.dox.h:879

Example where the Auto Info goes from user code

Datasource dd(...);
OracleSQLStatement stmt(dd, \getAutoInfo());
stmt.prepare("select * from foo");
while (stmt.next())
process_row(stmt.fetchRow());
# remember the SQLStatement transaction handling
stmt.commit();

Member Function Documentation

◆ constructor() [1/4]

OracleExtensions::OracleSQLStatement::constructor ( OracleExtensions::OracleDatasource  ds)
inline

Constructor taking OracleDatasource.

Parameters
dsthe OracleExtensions::OracleDatasource instance

This constructor variant uses ds settings for Automatic Application Info

◆ constructor() [2/4]

OracleExtensions::OracleSQLStatement::constructor ( OracleExtensions::OracleDatasourcePool  ds)
inline

Constructor taking OracleDatasourcePool.

Parameters
dsthe OracleExtensions::OracleDatasourcePool instance

This constructor variant uses ds settings for Automatic Application Info

◆ constructor() [3/4]

OracleExtensions::OracleSQLStatement::constructor ( Qore::SQL::Datasource  ds,
*code  userAutoInfo 
)
inline

Constructor taking standard Datasource.

Parameters
dsthe Qore::SQL::Datasource instance
userAutoInfoan optional code used for Automatic Application Info

◆ constructor() [4/4]

OracleExtensions::OracleSQLStatement::constructor ( Qore::SQL::DatasourcePool  ds,
*code  userAutoInfo 
)
inline

Constructor taking standard DatasourcePool.

Parameters
dsthe Qore::SQL::DatasourcePool instance
userAutoInfoan optional code used for Automatic Application Info

The documentation for this class was generated from the following file: