Qore OracleExtensions Module Reference  1.0
 All Classes Namespaces Functions Variables Pages
OracleExtensions::OracleLongOps Class Reference

Qore wrapper/helper for Long Operations. More...

Public Member Functions

 constructor (string op_name, string target_desc, string units, int totalwork)
 Create an OracleLongOps instance.
 
bool inProgress ()
 Get info if is the long operation finished or not from the totalwork/sofar comparsion.
 
*int getTarget ()
 Get the value of target attribute.
 

Public Attributes

string op_name
 The name of the long running task. It appears as the OPNAME column of v$session_longops.
 
string target_desc
 The description of the object being manipulated in this long operation. This provides a caption for the target parameter. This value appears in the TARGET_DESC field of v$session_longops.
 
string units
 Specifies the units in which sofar and totalwork are being represented. It appears as the UNITS field of v$session_longops.
 
int op_context = 0
 Any number the client wants to store. It appears in the CONTEXT column of v$session_longops.
 
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.
 
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.
 

Detailed Description

Qore wrapper/helper for Long Operations.

Instanes of this class do not make any changes in the database server. All changes are performed by OracleDatasource or OracleDatasourcePool. OracleExtensions::OracleLongOps just hold required attributes. It performs client side checks of attributes validity too.

See Examples

Member Function Documentation

OracleExtensions::OracleLongOps::constructor ( string  op_name,
string  target_desc,
string  units,
int  totalwork 
)
inline

Create an OracleLongOps instance.

Parameters
op_namemandatory string. Specifies the name of the long running task
target_descmandatory string. Specifies the description of the object being manipulated in this long operation
unitsmandatory string. Specifies the units in which sofar and totalwork are being represented
totalworkmandatory int. Any number (greater than 0) the client wants to store

It can trhow ORACLE-LONGOPS-ERROR when is some input parameter ot of allowed size.

* int OracleExtensions::OracleLongOps::getTarget ( )

Get the value of target attribute.

Return values
__7_int a target value Target specifies the object that is being worked on during the long running operation. For example, it could be a table ID that is being sorted. It appears as the TARGET column of v$session_longops.
bool OracleExtensions::OracleLongOps::inProgress ( )

Get info if is the long operation finished or not from the totalwork/sofar comparsion.

Return values
boolTrue is totalwork did not met the sofar attribute