Qore OracleExtensions Module Reference  1.1
OracleExtensions::OracleInstrumentationBase Class Referenceabstract

A base class for Automatic Application Info related classes. Not intended to be used directly. More...

Inheritance diagram for OracleExtensions::OracleInstrumentationBase:

Public Member Functions

bool setAutomaticDBInfo (*OracleExtensions::OracleApplicationInfo item, bool checkTransaction=True)
 Obtain info about transaction capturing and try to get available Application Info. More...
 
abstract setAppInfoCallback (*string oraclient, *string oramodule, *string oraaction)
 A method automatically called from setAppInfo() to allow custom implementations. More...
 
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. More...
 
 setAppInfo (*string client, *string module, *string action, bool fromSystem=True)
 An overloaded method with the same functionality as the OracleExtensions::OracleApplicationInfo variant.
 

Private Attributes

*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

A base class for Automatic Application Info related classes. Not intended to be used directly.

Member Function Documentation

◆ setAppInfo()

OracleExtensions::OracleInstrumentationBase::setAppInfo ( *OracleExtensions::OracleApplicationInfo  audit,
bool  fromSystem = True 
)

Set the explicit Application Info. The transaction lock is taken.

Parameters
audita OracleExtensions::OracleApplicationInfo instance with info
fromSystema flag if it goes from "system call". End user code usually does not need to use it.

◆ setAppInfoCallback()

abstract OracleExtensions::OracleInstrumentationBase::setAppInfoCallback ( *string  oraclient,
*string  oramodule,
*string  oraaction 
)
pure virtual

A method automatically called from setAppInfo() to allow custom implementations.

setAppInfoCallback() should be reimplemented in any of inherited class to allow set app info without m_ds or similar workarounds. Custom implementation can use advantages of direct Datasource/Pool inheritance.

Implemented in OracleExtensions::OracleSQLStatement, and OracleExtensions::OracleDatasourceBase.

◆ setAutomaticDBInfo()

bool OracleExtensions::OracleInstrumentationBase::setAutomaticDBInfo ( *OracleExtensions::OracleApplicationInfo  item,
bool  checkTransaction = True 
)

Obtain info about transaction capturing and try to get available Application Info.

Parameters
itemoptional OracleApplicationInfo with value or NOTHING
checkTransactiondefault=True. True = check if there is a transaction. False = do not check.
Return values
boolTrue if the ds will be rollbacked explicitly

The transaction handling is for example:

  • select: check if there is a transaction: no? rollback after run.
  • exec: yes! do not rollback - the transaction will be handled upstream in user code