Qore oracle Module ..
Loading...
Searching...
No Matches
OracleExtensions::OracleSQLStatement Class Reference

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

#include <OracleExtensions.qm.dox.h>

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

Public Member Methods

 constructor (Qore::SQL::Datasource ds, *code userAutoInfo)
 Constructor taking standard Datasource.
 
 constructor (Qore::SQL::DatasourcePool ds, *code userAutoInfo)
 Constructor taking standard DatasourcePool.
 
 constructor (OracleExtensions::OracleDatasource ds)
 Constructor taking OracleDatasource.
 
 constructor (OracleExtensions::OracleDatasourcePool ds)
 Constructor taking OracleDatasourcePool.
 
 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.
 
abstract setAppInfoCallback (*string oraclient, *string oramodule, *string oraaction)
 A method automatically called from setAppInfo() to allow custom implementations.
 
abstract bool currentThreadInTransaction ()
 A backend provided currentThreadInTransaction() for wrappeed or inheritted Datasource/Pool.
 
 setAppInfo (*OracleExtensions::OracleApplicationInfo audit, bool fromSystem=True)
 Set the explicit Application Info. The transaction lock is taken.
 
 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());
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:857
Oracle specific SQLStatement variant with Application Info capabilities.
Definition OracleExtensions.qm.dox.h:940

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)

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)

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 
)

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 
)

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: