272 constructor(*code userAutoInfo);
275 *code autoCode() {
return autoCode; }
312 setAppInfo(*
string client, *
string module, *
string action,
bool fromSystem=True);
390 any
exec(
string sql);
454 any
vexec(
string sql, softlist vargs);
467 any
vselect(
string sql, softlist vargs);
624 OracleDatasourceBase::constructor(*code userAutoInfo)
625 : OracleInstrumentationBase(userAutoInfo)
631 nothing OracleDatasourceBase::commit();
635 nothing OracleDatasourceBase::rollback();
639 OracleDatasourceBase::setLongOpsProgress(OracleLongOps lo);
643 OracleDatasourceBase::outputEnable(*
int bufferSize);
647 OracleDatasourceBase::outputDisable();
651 OracleDatasourceBase::outputPut(softstring text);
655 OracleDatasourceBase::outputPutLine(softstring text);
659 *
string OracleDatasourceBase::outputGet();
688 constructor(*
string client, *
string module, *
string action);
748 constructor(
string op_name,
string target_desc,
string units,
int totalwork) {
749 if (op_name.strlen() > 64)
750 throw "ORACLE-LONGOPS-ERROR",
751 sprintf(
"Constructor argument 'op_name' must have length 64 bytes max. Got: %d", op_name.strlen());
754 if (target_desc.strlen() > 32)
755 throw "ORACLE-LONGOPS-ERROR",
756 sprintf(
"Constructor argument 'target_desc' must have length 32 bytes max. Got: %d", target_desc.strlen());
759 if (target_desc.strlen() > 32)
760 throw "ORACLE-LONGOPS-ERROR",
761 sprintf(
"Constructor argument 'units' must have length 32 bytes max. Got: %d", target_desc.strlen());
765 throw "ORACLE-LONGOPS-ERROR",
766 sprintf(
"Constructor argument 'totalwork' must have greater than 0. Got: %d", totalwork);
797 *
int OracleLongOps::getRindex();
806 OracleLongOps::setRindex(
int i);
815 *
int OracleLongOps::getSlno();
823 OracleLongOps::setSlno(
int i);
839 constructor(
string driver, *
string user, *
string pass, *
string db, *
string encoding, *
string host, softint min=3, softint max=10, softint port=0, *code userAutoInfo)
842 m_ds =
new DatasourcePool(driver, user, pass, db, encoding, host, min, max);
851 m_ds =
new DatasourcePool(desc);
860 m_ds =
new DatasourcePool(opts);
873 any methodGate(
string meth);
876 DatasourcePool getDS() {
return m_ds; }
893 constructor(
string driver, *
string user, *
string pass, *
string db, *
string encoding, *
string host, softint port=0, *code userAutoInfo)
896 m_ds =
new Datasource(driver, user, pass, db, encoding, host, port);
905 m_ds =
new Datasource(desc);
914 m_ds =
new Datasource(opts);
927 nothing setAutoCommit(
bool auto);
930 any methodGate(
string meth);
990 : Qore::SQL::SQLStatement(ds),
1002 : Qore::SQL::SQLStatement(ds),
1015 : Qore::SQL::SQLStatement(ds.privateDS()),
1018 m_ds = ds.privateDS();
1028 : Qore::SQL::SQLStatement(ds.privateDS()),
1031 m_ds = ds.privateDS();
1071 extern string connstr =
"oracle:pvanek_omq/omq@xbox";
1074 any stmtTest(
object o);
1077 any test(
object o,
string m);
1080 testData(
object o1,
object o2,
string m);
1084 extern bool backRun = True;
1088 testLongOps(
object o);
1091 testDBMSOut(
object o)
1093 printf(
"testDBMS\n");
1096 o.outputPutLine(
'foo');
1097 o.outputPutLine(111);
1098 o.outputPutLine(now());
1099 o.exec(
"begin dbms_output.put_line(%v); end;",
"hey, it's server here");
1101 *
string res = o.outputGet();
1102 printf(
"DBMS_OUTPUT RESULT:\n%N\n", res);
1106 extern Counter autoCnt();
1112 sprintf(
"auto info: %d", autoCnt.getCount()),
1113 sprintf(
"auto info: %n", now())
1117 baseTest(
object dd);
1123 testPoolConnectionCount();
1127 background backRunLogger();
1128 on_exit backRun = False;
1131 dd.setAutoCommit(False);
1139 testPoolConnectionCount();
nothing rollback()
SQLStatement::rollback with clearing of Automatic Application Info if required.
clear()
Clear values from all attributes.
*OracleExtensions::OracleApplicationInfo userInfo
potential user Application Info set by beginTransaction or explicit call of setAppInfo ...
Definition: OracleExtensions.qm.dox.h:264
string op_name
The name of the long running task. It appears as the OPNAME column of v$session_longops.
Definition: OracleExtensions.qm.dox.h:716
any execRaw(string sql)
execRaw with automatic approach of getting application info
constructor(string driver, *string user, *string pass, *string db, *string encoding, *string host, softint port=0, *code userAutoInfo)
Standard Qore::DatasourcePool constructor.
Definition: OracleExtensions.qm.dox.h:893
constructor(OracleExtensions::OracleDatasource ds)
Constructor taking OracleDatasource.
Definition: OracleExtensions.qm.dox.h:1014
bool next()
SQLStatement::next with Automatic Application Info.
*string getHostName()
AbstractDatasource implementation for Datasource and DatasourcePool.
Definition: OracleExtensions.qm.dox.h:344
nothing commit()
SQLStatement::commit with clearing of Automatic Application Info if required.
OracleDatasource class implementation.
Definition: OracleExtensions.qm.dox.h:885
string units
Specifies the units in which sofar and totalwork are being represented. It appears as the UNITS field...
Definition: OracleExtensions.qm.dox.h:720
any getServerVersion()
AbstractDatasource implementation for Datasource and DatasourcePool.
Definition: OracleExtensions.qm.dox.h:326
*int getTarget()
Get the value of target attribute.
constructor(OracleExtensions::OracleDatasourcePool ds)
Constructor taking OracleDatasourcePool.
Definition: OracleExtensions.qm.dox.h:1027
public OracleExtensions namespace defines stuff for use
Definition: OracleExtensions.qm.dox.h:257
nothing execArgs(softlist vargs)
SQLStatement::execArgs with Automatic Application Info.
*string client
Supplies any additional information about the client application. This information is stored in the V...
Definition: OracleExtensions.qm.dox.h:672
bool inTransaction()
AbstractDatasource implementation for Datasource and DatasourcePool.
Definition: OracleExtensions.qm.dox.h:346
constructor(string op_name, string target_desc, string units, int totalwork)
Create an OracleLongOps instance.
Definition: OracleExtensions.qm.dox.h:748
constructor(string desc, *code userAutoInfo)
Standard Qore::DatasourcePool constructor.
Definition: OracleExtensions.qm.dox.h:848
constructor(*string client, *string module, *string action)
Create OracleExtensions::OracleApplicationInfo instance.
*string getUserName()
AbstractDatasource implementation for Datasource and DatasourcePool.
Definition: OracleExtensions.qm.dox.h:324
*string getOSEncoding()
AbstractDatasource implementation for Datasource and DatasourcePool.
Definition: OracleExtensions.qm.dox.h:338
*string action
Name of current action within the current module. If you do not want to specify an action...
Definition: OracleExtensions.qm.dox.h:676
string getDBEncoding()
AbstractDatasource implementation for Datasource and DatasourcePool.
Definition: OracleExtensions.qm.dox.h:342
setAppInfoCallback(*string oraclient, *string oramodule, *string oraaction)
Set app info by wrapped Datasource/Pool object.
*string getPassword()
AbstractDatasource implementation for Datasource and DatasourcePool.
Definition: OracleExtensions.qm.dox.h:328
abstract setAppInfoCallback(*string oraclient, *string oramodule, *string oraaction)
A method automatically called from setAppInfo() to allow custom implementations.
nothing beginTransaction(*string client, *string module, *string action)
Start new transaction with Application info set as strings or with potential automatic Application in...
constructor(string driver, *string user, *string pass, *string db, *string encoding, *string host, softint min=3, softint max=10, softint port=0, *code userAutoInfo)
Standard Qore::DatasourcePool constructor.
Definition: OracleExtensions.qm.dox.h:839
any selectRow(string sql)
selectRow with automatic approach of getting application info
any vselectRow(string sql, softlist vargs)
vselectRow with automatic approach of getting application info
constructor(hash opts, *code userAutoInfo)
Standard Qore::DatasourcePool constructor.
Definition: OracleExtensions.qm.dox.h:857
*int getPort()
AbstractDatasource implementation for Datasource and DatasourcePool.
Definition: OracleExtensions.qm.dox.h:332
*string getDBName()
AbstractDatasource implementation for Datasource and DatasourcePool.
Definition: OracleExtensions.qm.dox.h:322
bool currentThreadInTransaction()
A backend provided m_ds.currentThreadInTransaction() for wrappeed Datasource/Pool.
any exec(string sql)
exec with automatic approach of getting application info
int totalwork
Any number the client wants to store. It appears in the TOTALWORK column of v$session_longops. This is typically an estimate of the total amount of work needed to be done in this long running operation.
Definition: OracleExtensions.qm.dox.h:726
constructor(Qore::SQL::Datasource ds, *code userAutoInfo)
Constructor taking standard Datasource.
Definition: OracleExtensions.qm.dox.h:989
bool setAutomaticDBInfo(*OracleExtensions::OracleApplicationInfo item, bool checkTransaction=True)
Obtain info about transaction capturing and try to get available Application Info.
Qore wrapper/helper for Long Operations.
Definition: OracleExtensions.qm.dox.h:712
OracleExtensions::OracleApplicationInfo holds user info for Application Info.
Definition: OracleExtensions.qm.dox.h:668
*code autoCode
user code used in setAutomaticDBInfo when there is no OracleApplicationInfo value provided ...
Definition: OracleExtensions.qm.dox.h:266
any vselect(string sql, softlist vargs)
vselect with automatic approach of getting application info
A base class for Automatic Application Info related classes. Not intended to be used directly...
Definition: OracleExtensions.qm.dox.h:260
int sofar
Any number the client wants to store. It appears in the SOFAR column of v$session_longops. This is typically the amount of work which has been done so far.
Definition: OracleExtensions.qm.dox.h:724
any vexec(string sql, softlist vargs)
vexec with automatic approach of getting application info
bool isEmpty()
Check if is the instance empty or with at least one value.
any vselectRows(string sql, softlist vargs)
vselectRows with automatic approach of getting application info
abstract bool currentThreadInTransaction()
A backend provided currentThreadInTransaction() for wrappeed or inheritted Datasource/Pool.
*string module
Name of module that is currently running. When the current module terminates, call this procedure wit...
Definition: OracleExtensions.qm.dox.h:674
string target_desc
The description of the object being manipulated in this long operation. This provides a caption for t...
Definition: OracleExtensions.qm.dox.h:718
any getClientVersion()
AbstractDatasource implementation for Datasource and DatasourcePool.
Definition: OracleExtensions.qm.dox.h:336
string getDriverName()
AbstractDatasource implementation for Datasource and DatasourcePool.
Definition: OracleExtensions.qm.dox.h:340
object m_ds
Internally used datasource/pool.
Definition: OracleExtensions.qm.dox.h:268
setAppInfoCallback(*string oraclient, *string oramodule, *string oraaction)
Set app info by wrapped Datasource/Pool object.
string getConfigString()
AbstractDatasource implementation for Datasource and DatasourcePool.
Definition: OracleExtensions.qm.dox.h:334
constructor(string desc, *code userAutoInfo)
Standard Qore::DatasourcePool constructor.
Definition: OracleExtensions.qm.dox.h:902
int op_context
Any number the client wants to store. It appears in the CONTEXT column of v$session_longops.
Definition: OracleExtensions.qm.dox.h:722
hash getConfigHash()
AbstractDatasource implementation for Datasource and DatasourcePool.
Definition: OracleExtensions.qm.dox.h:330
any selectRows(string sql)
selectRows with automatic approach of getting application info
OracleDatasourcePool class implementation.
Definition: OracleExtensions.qm.dox.h:831
constructor(Qore::SQL::DatasourcePool ds, *code userAutoInfo)
Constructor taking standard DatasourcePool.
Definition: OracleExtensions.qm.dox.h:1001
any select(string sql)
select with automatic approach of getting application info
bool inProgress()
Get info if is the long operation finished or not from the totalwork/sofar comparsion.
constructor(Datasource ds, *code userAutoInfo)
New constructor: use already existing Datasource.
Definition: OracleExtensions.qm.dox.h:921
bool currentThreadInTransaction()
A backend provided m_ds.currentThreadInTransaction() for wrappeed Datasource/Pool.
A base class for OracleDatasource and OracleDatasourcePool. Not intended to be used directly...
Definition: OracleExtensions.qm.dox.h:319
Oracle specific SQLStatement variant with Application Info capabilities.
Definition: OracleExtensions.qm.dox.h:980
nothing exec()
SQLStatement::exec with Automatic Application Info.
constructor(hash opts, *code userAutoInfo)
Standard Qore::DatasourcePool constructor.
Definition: OracleExtensions.qm.dox.h:911
setAppInfo(*OracleExtensions::OracleApplicationInfo audit, bool fromSystem=True)
Set the explicit Application Info. The transaction lock is taken.
constructor(DatasourcePool ds, *code userAutoInfo)
New constructor: use already existing DatasourcePool.
Definition: OracleExtensions.qm.dox.h:867