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

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

#include <OracleExtensions.qm.dox.h>

Inheritance diagram for OracleExtensions::OracleInstrumentationBase:
OracleExtensions::OracleDatasourceBase OracleExtensions::OracleSQLStatement OracleExtensions::OracleDatasource OracleExtensions::OracleDatasourcePool

Public Member Methods

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.
 

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 
)

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.

◆ 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

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