Qore OracleExtensions Module Reference  1.1
OracleExtensions::OracleSQLStatement Class Reference

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

Inheritance diagram for OracleExtensions::OracleSQLStatement:

Public Member Functions

 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 Functions 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.
 

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();

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 ( 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() [2/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

◆ constructor() [3/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() [4/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