Qorus Integration Engine®  4.0.3.p2_git
QorusSystemDatasourceService Class Reference

the main datasource service class More...

Inheritance diagram for QorusSystemDatasourceService:
QorusSystemService

Private:Internal Member Methods

 reload ()
 DEPRECATED: refresh datasources. More...
 

Static Private:Internal Member Methods

static deprecated Datasource get (string name)
 DEPRECATED: gets a shared datasource object with autocommit turn on. More...
 
static deprecated DatasourcePool getUnique (string name)
 DEPRECATED: gets a DatasourcePool object, suitable for transaction management with short transactions. More...
 
static deprecated DatasourcePool getPool (string name)
 DEPRECATED: gets a DatasourcePool object, suitable for transaction management with short transactions. More...
 
static deprecated Datasource getDedicated (string name)
 DEPRECATED: gets a new, dedicated Datasource object, suitable for transaction management for long-running transactions. More...
 
static deprecated nothing update_hash (string name, hash h)
 DEPRECATED: adds or updates an existing datasource entry, params: name, hash (like that returned by parse_datasource()) More...
 
static deprecated nothing update_string (string name, string desc)
 DEPRECATED: adds or updates an existing datasource entry, params: string(name), string(description that can be parsed by parse_datasource()) More...
 
static deprecated nothing update (string name, string type, string user, string pass, string db, *string charset, *string host, *softint port, softint min=0, softint max=0, *hash opts)
 DEPRECATED: adds or updates an existing datasource entry, params: name, type, user, pass, dbname[, charset, host, port, min, max]. More...
 
static deprecated hash showDefaults ()
 DEPRECATED: shows currently-cached datasource parameters (without passwords) More...
 
static deprecated hash showDefaultsWithPasswords ()
 DEPRECATED: shows currently-cached datasource parameters (with passwords) More...
 
static deprecated nothing reset (string name)
 DEPRECATED: resets a datasource; any new requests for instances of this datasource will result in a new datasource or datasource pool being opened, params: name. More...
 
static deprecated auto select (string name, string sql)
 DEPRECATED: synonym for selectRow(); use selectRow() instead. More...
 
static deprecated auto selectRow (string name, string sql)
 DEPRECATED: runs a test 'selectRow' on the datasource. More...
 
static deprecated nothing flushToFile (*hash optHash)
 DEPRECATED: write current datasources into file; accepts an optional hash parameter with datasource information, if it's NOTHING, currently set datasources are used. More...
 
static deprecated string get_desc (string name)
 DEPRECATED: returns a datasource description string for the given datasource, if known, otherwise throws an exception. More...
 

Additional Inherited Members

- Public Member Methods inherited from QorusSystemService
 constructor ()
 initializes the info service
 
softlist getOrderInfoFromKey (string name, string version, softstring key, softstring value)
 returns order instance info from user order key (params: workflowname, workflowversion, keyname, value)
 
*list getWorkflowListFromWorkflowKey (string workflow, softstring key, softstring value)
 returns order instance info from the workflow name, key, and value More...
 
hash getAllInfoFromOrderKey (string name, string version, softstring key, softstring value)
 returns all information about a workflow from a user order key (params: workflowname, workflowversion, keyname, value)
 
deprecated *hash getWorkflowMetadata ()
 gets workflow metadata (optional params: list of IDs), returns: hash of workflow metadata keyed by name and then version: COMPAT VERSION with fake flow information (removed in Qorus v2); use getWorkflowMetadata2() instead More...
 
*hash getWorkflowMetadata2 ()
 gets workflow metadata (optional params: list of IDs), returns: hash of workflow metadata keyed by name and then version More...
 
*hash getWorkflowMetadataFromName (string name, *string ver)
 gets workflow metadata from name and version (params: name, optional: version), returns: hash of workflow metadata keyed by name and then version: COMPAT VERSION with fake flow information; use getWorkflowMetadataFromName2() instead More...
 
*hash getWorkflowMetadataFromName2 (string name, *string ver)
 gets workflow metadata from name and version (params: name, optional: version), returns: hash of workflow metadata keyed by name and then version, new version without flows (removed in Qorus v2) More...
 
*hash getFunctionInstance (softint fiid, *softdate date)
 retrieves function data from the function_instanceid (params: function_instanceid), returns: hash of function data keyed by name and then version
 
*hash getFunctionInstanceFromName (string name, *string ver)
 retrieves function data from the name and optionally the version (params: name, [version]), returns: hash of function data keyed by name and then version
 
*hash getServiceMethod2 (softint mid, *softdate date)
 retrieves method data from the service_methodid (params: service_methodid), returns: hash of method data More...
 
*hash getServiceMethod (softint mid, *softdate date)
 retrieves method data from the service_methodid (params: service_methodid), returns: hash of method data More...
 
*list getWorkflowInstanceList (*softlist workflowid, *softdate date=now() - 1D, any stati, softint rownum=OptionHelper::getOption("row-limit"))
 gets a list of workflow instance ids (not more than 100 by default, can be overridden with the 4th argument), params: workflowid (single value, list, or NOTHING), date, [statuses, num rows]
 
list getWorkflowInstances (*softlist wfids, *list statuses, *softdate modified, softint rownum=OptionHelper::getOption("row-limit"), *int offset, *softlist sort, *softlist wfiids, *softbool desc, *date minstarted, *date maxstarted)
 gets a list of workflow instance ids; this is the safe and preferred variant of this method More...
 
deprecated list getWorkflowInstances (softint workflowid, *string condition, int rownum=OptionHelper::getOption("row-limit"))
 gets a list of workflow instance ids, params: workflowid, condition, number of rows (100 default) More...
 
*list getWorkflowInstancesByKeyValue (softlist val, *softstring key, *softlist wfids, *softlist statuses, *date modified, softint rownum=OptionHelper::getOption("row-limit"), *int offset, *softlist sort, *softlist wfiids, *softbool desc, *date minstarted, *date maxstarted)
 retrieves workflow instances from a key value and optional key name
 
*list searchWorkflowInstances (*hash h)
 searches for workflow order instances according to a hash More...
 
list getWorkflowInstanceOverview (list wfilist)
 return the Workflow Instance Overview info, PARAMS: list(hash("ID",[optional: "date"])), RETURN: list(hash(info))
 
list getStepInstanceList (softint wfiId)
 gets a list of step instances, params: workflowinstanceid
 
list getErrorInstanceList (softint workflowInstanceId, *softint stepId, *softint ind)
 gets a list of error instances, params: workflowInstanceId, [stepId, ind]
 
list getErrorInstanceListByWFIID (softint workflowInstanceId, *softint stepId)
 gets a list of error instances, params: workflowInstanceId, [stepId]
 
*hash< auto > getClass (softint classid, *softdate date)
 retrieves class data from a classid; returns: hash of class data keyed by name and then version
 
*hash getStepMetadata ()
 gets step metadata (optional params: list of IDs), returns: hash of step metadata information keyed by name and then version
 
*hash getTreeWithWorkflowInstance (softint workflowinstanceid, softbool full=False, softbool compat=True)
 retrieves tree view like structure that contains specific instanceid (params: workflowinstanceid)
 
*hash getWFIAllInfo (softint workflowInstanceID, *softdate lastModifiedDate, softbool compat=True, softbool with_sensitive_data=False)
 Retrieves all workflow instance info (params: workflowInstanceID, [lastModifiedDate]; output hash keys: InstanceInfo, OrderInfo, StepInstances, ErrorInstances, LastModified. More...
 
*hash getWFIInstanceInfo (softint workflowInstanceID, *softdate lastModifiedDate, softbool compat=True)
 Retrieves only workflow instance info (params: workflowInstanceID, [lastModifiedDate]; output hash keys: InstanceInfo, LastModified. More...
 
*hash getWFIOrderInfo (softint workflowInstanceID, *softdate lastModifiedDate, softbool compat=True, softbool with_sensitive_data=False)
 Retrieves workflow instances order info (params: workflowInstanceID, [lastModifiedDate]; output hash keys: OrderInfo, LastModified. More...
 
*hash getWFIStepInstances (softint workflowInstanceID, *softdate lastModifiedDate, softbool compat=False)
 Retrieves all step info for workflow instance (params: workflowInstanceID, [lastModifiedDate]; output hash keys: StepInstances, LastModified.
 
*hash getWFIErrorInstances (softint workflowInstanceID, *softdate lastModifiedDate, softbool compat=True)
 gets workflow instance error info (params: workflowInstanceID, [lastModifiedDate]; output hash keys: ErrorInstances, LastModified
 
*list getWorkflowInstanceListFromWorkflowNameAndKeyValue (string name, softstring val)
 retrieves workflow instances from a workflow name and a key value, returns a list of workflow instance IDs
 
*list getWorkflowInstanceListFromWorkflowNameVersionAndKeyValue (string name, string version, softstring val)
 retrieves workflow instances from a workflow name, version, and key value, returns a list of workflow instance IDs
 
*list getWorkflowInstanceListFromKeyValue (softstring val)
 retrieves workflow instances from a key value only, returns a list of workflow instance IDs
 
list getOrderInfoList (string name, softstring key, softstring value)
 returns order info from a workflow name and an order key and value (params: workflowname, keyname, value)
 
*list< auto > searchOrderKeys (hash params)
 returns a list of workflow instance info matching the input criteria More...
 
softlist searchWorkflowErrors (hash h)
 returns a list of matching errors for the input criteria More...
 
*list searchReleases (*hash params)
 returns release info More...
 
*list searchSessions (*hash params)
 returns information about application sessions More...
 
*hash getUnpostedEvents (*softlist ids, *softdate lastmod=now() - 6M, softint rownum=OptionHelper::getOption("row-limit"), *int offset)
 returns a hash of event type names with lists of unposted events for each, params: event ID(s), [last modified date] More...
 
*hash getUnpostedEventsFromName (string eventname, *softdate lastmod)
 returns a hash of event type names with lists of unposted events for each, params: event type name, [last modified date] More...
 
list searchEvents (*hash h)
 returns workflow synchronization event information More...
 
*hash getJobMetadata ()
 retrieves job metadata (optional params: list of job ids), returns: job info keyed by name More...
 
*hash getJobMetadataFromName (string name)
 retrieves job metadata from the name, returns: job info keyed by name More...
 
list getJobList ()
 retrieves a list of all jobs without the code field More...
 
*hash getJobStatus (softint jiid)
 returns NOTHING if the job instance ID is not valid or a hash giving job instance status corresponding to the job instance ID passed as an argument More...
 
*list getJobInstanceList (any jobid, *softdate date=now() - 1D, any stati, softint rownum=OptionHelper::getOption("row-limit"))
 gets a list of job instance ids (not more than 100 by default, can be overridden with the 4th argument), params: jobid (single value or list), date, [statuses, num rows] More...
 
*list getJobInstances (*softlist jobids, *softlist statuses, *softdate modified, softint rownum=OptionHelper::getOption("row-limit"), *softint offset, *softlist sort, *softlist jiids, *softbool desc, *softbool full)
 gets a list of job instance ids, params: jobid, condition, number of rows (100 default) More...
 
softlist getOrderInstanceNotes (softint wfiid, *int count)
 gets a list of order instance notes More...
 
list< hash< SlaEventInfo > > searchSlaEvents (*hash h)
 searches for SLA events according to the given criteria and returns a list of results More...
 
softlist< hash< SlaPerformanceInfo > > getSlaPerformance (*hash h)
 searches for SLA events according to the given criteria and returns a list of results More...
 
- Static Public Member Methods inherited from QorusSystemService
static deprecated *hash getWorkflowStatus (softint id)
 returns workflow instance status from workflow_instanceid: COMPAT VERSION with fake flow and flow_instance information (removed in Qorus v2); use getWorkflowStatus2() instead More...
 
static *hash getWorkflowStatus2 (softstring wfiid)
 returns workflow order data instance status from the workflow_instanceid More...
 
static *hash getOrderInfo (softstring wfiid)
 returns order instance info from workflow_instanceid
 
static *list getOrderInfoFromExternalID (softstring id)
 returns order instance info from external_order_instanceid
 
static softlist getOrdersFromKey (softstring key, softstring value)
 returns order instance info from the key and value
 
static *hash< auto > getWorkflowOverview (softdate date=now() - 1D, *softlist wfids, softbool useSqlCache=True, softbool with_deprecated=True)
 gets workflow overview, params: [date, [workflowids]]: If no date is given, default = last 24 hours More...
 
static *hash getWorkflowOverviewFromName (softdate date=now() - 1D, *string name, *string version, softbool useSqlCache=True, softbool with_deprecated=True)
 gets workflow overview, params: [date, [name, [version]]]: If no date is given, default = last 24 hours More...
 
static *list getWorkflowSummaryOverview (softdate date=now() - 1D, softbool useSqlCache=True, softbool with_deprecated=True)
 gets system overview, params: [date]: If no date is given, default = last 24 hours More...
 
static *hash getServiceMetadata ()
 retrieves service metadata (optional params: list of service ids), returns: service info keyed by name. NOTE: if no list is given, only the latest version of each service will be returned
 
static *hash getServiceMetadataFromName (string type, string name, *string ver)
 retrieves service metadata from the type, name and optional version (params: type, name, [version]), returns: service info keyed by name. NOTE: if no version is given, only the latest version will be returned
 
static list getLibraryMetadata ()
 retrieves function library information as a list of hashes with the keys name, function_instanceid
 
static *hash getClassFromName (string name, *string ver)
 retrieves class data from the class name and optional version (params: name, [version]), returns: hash of class data keyed by name and then version
 
static *hash getConstant (softint constantid, *softdate date)
 retrieves constant data from the constantid (params: constantid), returns: hash of constant data keyed by name and then version
 
static *hash getConstantFromName (string name, *string ver)
 retrieves constant data from the constant name and optional version (params: name, [version]), returns: hash of constant data keyed by name and then version
 
static *hash getWFIOrderKeysOnly (softint workflowInstanceID)
 Retrieves only order keys for workflow instance params: workflowInstanceID; output: hash.
 
static *list getWorkflowProcessingSummary (hash h)
 returns a summary of workflow processing for the given time period and optional workflow ID(s) More...
 
static *list getStepProcessingSummary (hash h)
 returns a summary of step processing for the given time period and optional step ID(s) More...
 
static *hash getJobOverview (softdate date=now() - 1D, any jobids, bool useSqlCache=True)
 gets job overview, params: [date, [jobids]]: If no date is given, default = last 24 hours More...
 
static *hash getJobOverviewFromName (softdate date=now() - 1D, *string name, bool useSqlCache=True)
 gets job overview, params: [date, [name]]: If no date is given, default = last 24 hours More...
 

Detailed Description

the main datasource service class

Member Function Documentation

◆ flushToFile()

static deprecated nothing QorusSystemDatasourceService::flushToFile ( *hash  optHash)
inlinestaticprivate:internal

DEPRECATED: write current datasources into file; accepts an optional hash parameter with datasource information, if it's NOTHING, currently set datasources are used.

Parameters
optHashan optional hash parameter with datasource information, if not included in the call, currently set datasources are used
Exceptions
DATASOURCE-ERRORerror saving file
Deprecated:
use PUT /api/latest/remote/datasources?action=flush instead
Note
- lock: OMQ::SLRead
- write: True (external calls require OMQ::QR_CALL_SYSTEM_SERVICES_RW)

◆ get()

static deprecated Datasource QorusSystemDatasourceService::get ( string  name)
inlinestaticprivate:internal

DEPRECATED: gets a shared datasource object with autocommit turn on.

it is an error to close or delete the Datasource returned by this method or to turn off the autocommit status

Parameters
namethe name of the datasource
Returns
a shared Datasource object with autocommit turn on
Exceptions
DATASOURCE-SERVICE-EXCEPTIONunknown or system datasource
See also
getDedicated()
getPool()
Deprecated:
use get_datasource_pool() instead; the concept of datasources with auto-commit enabled is deprecated in Qorus
Note
- internal: True (this method can only be called internally)

◆ get_desc()

static deprecated string QorusSystemDatasourceService::get_desc ( string  name)
inlinestaticprivate:internal

DEPRECATED: returns a datasource description string for the given datasource, if known, otherwise throws an exception.

Parameters
namethe name of the datasource
Returns
datasource description string for the given datasource, if known, otherwise throws an exception
Exceptions
DATASOURCE-ERRORunknown datasource
Deprecated:
use get_datasource_info() or GET /api/latest/remote/datasources/{name} instead

◆ getDedicated()

static deprecated Datasource QorusSystemDatasourceService::getDedicated ( string  name)
inlinestaticprivate:internal

DEPRECATED: gets a new, dedicated Datasource object, suitable for transaction management for long-running transactions.

Parameters
namethe name of the datasource
Returns
a new, dedicated Datasource object, suitable for transaction management for long-running transactions
Exceptions
DATASOURCE-ERRORunknown or system datasource
See also
getPool()
get()
Deprecated:
use get_datasource_dedicated() instead
Note
- internal: True (this method can only be called internally)

◆ getPool()

static deprecated DatasourcePool QorusSystemDatasourceService::getPool ( string  name)
inlinestaticprivate:internal

DEPRECATED: gets a DatasourcePool object, suitable for transaction management with short transactions.

Parameters
namethe name of the datasource
Returns
a DatasourcePool object, suitable for transaction management with short transactions
Exceptions
DATASOURCE-ERRORunknown or system datasource
See also
getDedicated()
get()
Deprecated:
use get_datasource_pool() instead
Note
- internal: True (this method can only be called internally)

◆ getUnique()

static deprecated DatasourcePool QorusSystemDatasourceService::getUnique ( string  name)
inlinestaticprivate:internal

DEPRECATED: gets a DatasourcePool object, suitable for transaction management with short transactions.

Parameters
namethe name of the datasource
Returns
a DatasourcePool object, suitable for transaction management with short transactions
See also
getPool()
Deprecated:
use get_datasource_pool() instead
Note
- internal: True (this method can only be called internally)

◆ reload()

QorusSystemDatasourceService::reload ( )
inlineprivate:internal

DEPRECATED: refresh datasources.

It is necessary to call this method (or reset the service) to re-read the configuration file

Exceptions
FILELINEITERATOR-OPEN-ERRORerror opening configuration file

◆ reset()

static deprecated nothing QorusSystemDatasourceService::reset ( string  name)
inlinestaticprivate:internal

DEPRECATED: resets a datasource; any new requests for instances of this datasource will result in a new datasource or datasource pool being opened, params: name.

Parameters
namethe name of the datasource to reset
Exceptions
DATASOURCE-ERRORunknown or system datasource
Deprecated:
use PUT /api/latest/remote/datasources/{name}?action=reset instead

◆ select()

static deprecated auto QorusSystemDatasourceService::select ( string  name,
string  sql 
)
inlinestaticprivate:internal

DEPRECATED: synonym for selectRow(); use selectRow() instead.

Parameters
namethe name of the datasource to execute the select on
sqlthe SQL string to execute
Returns
the result of executing Datasource::selectRow() with the given arguments
Exceptions
DATASOURCE-ERRORunknown or system datasource
Deprecated:
use select methods in the system.sqlutil service instead

◆ selectRow()

static deprecated auto QorusSystemDatasourceService::selectRow ( string  name,
string  sql 
)
inlinestaticprivate:internal

DEPRECATED: runs a test 'selectRow' on the datasource.

Parameters
namethe name of the datasource to execute the select on
sqlthe SQL string to execute
Returns
the result of executing Datasource::selectRow() with the given arguments
Exceptions
DATASOURCE-ERRORunknown or system datasource
Deprecated:
use select methods in the system.sqlutil service instead

◆ showDefaults()

static deprecated hash QorusSystemDatasourceService::showDefaults ( )
inlinestaticprivate:internal

DEPRECATED: shows currently-cached datasource parameters (without passwords)

Returns
a hash of datasource information, each hash value is a hash with the following possible keys (not all keys may be set on all datasources):
  • type: the driver name for the datasource
  • user: the username for the connection
  • charset: the database-specific character set name for the connection
  • db: the database name for the connection
  • host: the hostname for the connection
  • port: the port number for the connection
  • desc: a descriptive string for the connection
  • locked: True if the datasource is locked
  • options: a hash with the following 2 members: min and max
  • shared-pool: a string giving shared pool status (if any shared pool exists)
Deprecated:
use GET /api/remote/datasources instead

◆ showDefaultsWithPasswords()

static deprecated hash QorusSystemDatasourceService::showDefaultsWithPasswords ( )
inlinestaticprivate:internal

DEPRECATED: shows currently-cached datasource parameters (with passwords)

Returns
a hash of datasource information, each hash value is a hash with the following possible keys (not all keys may be set on all datasources):
  • type: the driver name for the datasource
  • user: the username for the connection
  • password: the password for the connection
  • charset: the database-specific character set name for the connection
  • db: the database name for the connection
  • host: the hostname for the connection
  • port: the port number for the connection
  • desc: a descriptive string for the connection
  • locked: True if the datasource is locked
  • options: a hash with the following 2 members: min and max
  • shared-pool: a string giving shared pool status (if any shared pool exists)
Note
- requires role OMQ::QR_DATASOURCE_CONTROL
Deprecated:
use GET /api/remote/datasources instead
Note
- lock: OMQ::SLRead

◆ update()

static deprecated nothing QorusSystemDatasourceService::update ( string  name,
string  type,
string  user,
string  pass,
string  db,
*string  charset,
*string  host,
*softint  port,
softint  min = 0,
softint  max = 0,
*hash  opts 
)
inlinestaticprivate:internal

DEPRECATED: adds or updates an existing datasource entry, params: name, type, user, pass, dbname[, charset, host, port, min, max].

Parameters
namethe name of the datasource to update or add
typethe name of the driver
userthe name of the user for connections based on this datasource
passthe password for connections based on this datasource
dbthe database name for connections based on this datasource
charsetthe database-specific character encoding for connections based on this datasource
hostthe optional hostname for new connections
portthe optional port number for new connections
minthe minimum number of connections for DatasourcePool objects created from this datasource
maxthe maximum number of connections for DatasourcePool objects created from this datasource
optsother driver options
Exceptions
DATASOURCE-SERVICE-EXCEPTIONunknown or system datasource
Note
Changing a datasource with this method is permanent
Deprecated:
use PUT /api/latest/remote/datasources/{name} instead

◆ update_hash()

static deprecated nothing QorusSystemDatasourceService::update_hash ( string  name,
hash  h 
)
inlinestaticprivate:internal

DEPRECATED: adds or updates an existing datasource entry, params: name, hash (like that returned by parse_datasource())

Parameters
namethe name of the datasource to update or add
ha datasource hash like that returned by parse_datasource()
Exceptions
DATASOURCE-ERRORempty name string passed as an argument or tried to update a system datasource
Note
Changing a datasource with this method is permanent
Deprecated:
use PUT /api/latest/remote/datasources/{name} instead

◆ update_string()

static deprecated nothing QorusSystemDatasourceService::update_string ( string  name,
string  desc 
)
inlinestaticprivate:internal

DEPRECATED: adds or updates an existing datasource entry, params: string(name), string(description that can be parsed by parse_datasource())

Parameters
namethe name of the datasource to update or add
desca datasource description string, like: driver:user/pass@db(encoding)%host:port{min=x,max=y}
Exceptions
DATASOURCE-SERVICE-EXCEPTIONunknown or system datasource
Note
Changing a datasource with this method is permanent
Deprecated:
use PUT /api/latest/remote/datasources/{name} instead

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