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

void constructor (Qore::SQL::Datasource ds, soft< code > userAutoInfo)
 Oracle specific SQLStatement variant with Application Info capabilities.
 
void constructor (Qore::SQL::DatasourcePool ds, soft< code > userAutoInfo)
 Constructor taking standard DatasourcePool.
 
void constructor (OracleExtensions::OracleDatasource ds)
 Constructor taking OracleDatasource.
 
void constructor (OracleExtensions::OracleDatasourcePool ds)
 Constructor taking OracleDatasourcePool.
 
void setAppInfoCallback (soft< string > oraaction, soft< string > oraclient, soft< string > oramodule)
 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
void constructor (soft< code > userAutoInfo)
 Internally used datasource/pool.
 
abstract void setAppInfoCallback (soft< string > oraaction, soft< string > oraclient, soft< string > oramodule)
 A method automatically called from setAppInfo() to allow custom implementations.
 
abstract bool currentThreadInTransaction ()
 A backend provided currentThreadInTransaction() for wrappeed or inheritted Datasource/Pool.
 
void setAppInfo (soft< OracleExtensions::OracleApplicationInfo > audit, bool fromSystem)
 A backend provided currentThreadInTransaction() for wrappeed or inheritted Datasource/Pool.
 
void setAppInfo (soft< string > action, bool fromSystem, soft< string > client, soft< string > module)
 An overloaded method with the same functionality as the OracleExtensions::OracleApplicationInfo variant.
 

Additional Inherited Members

- Private Attributes inherited from OracleExtensions::OracleInstrumentationBase
soft< OracleExtensions::OracleApplicationInfouserInfo
 potential user Application Info set by beginTransaction or explicit call of setAppInfo
 
soft< 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:675
Oracle specific SQLStatement variant with Application Info capabilities.
Definition OracleExtensions.qm.dox.h:752

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]

void 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]

void 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]

void OracleExtensions::OracleSQLStatement::constructor ( Qore::SQL::Datasource  ds,
soft< code >  userAutoInfo 
)

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

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

◆ constructor() [4/4]

void OracleExtensions::OracleSQLStatement::constructor ( Qore::SQL::DatasourcePool  ds,
soft< 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: