Qorus Integration Engine® Enterprise Edition 7.0.6_prod
Loading...
Searching...
No Matches
QorusSystemDatasourceService Class Reference

system datasource service More...

Inherits QorusSystemService.

Public Member Methods

 reload ()
 reload service method
 
Datasource get (string name)
 get service method
 
DatasourcePool getUnique (string name)
 getUnique service method
 
DatasourcePool getPool (string name)
 getPool service method
 
Datasource getDedicated (string name)
 getDedicated service method
 
nothing update_hash (string name, hash h)
 update_hash service method
 
nothing update_string (string name, string desc)
 update_string service method
 
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)
 update service method
 
hash showDefaults ()
 showDefaults service method
 
hash showDefaultsWithPasswords ()
 showDefaultsWithPasswords service method
 
nothing reset (string name)
 reset service method
 
auto select (string name, string sql)
 select service method
 
auto selectRow (string name, string sql)
 selectRow service method
 
nothing flushToFile (*hash optHash)
 flushToFile service method
 
string get_desc (string name)
 get_desc service method
 

Detailed Description

system datasource service

Member Function Documentation

◆ flushToFile()

nothing QorusSystemDatasourceService::flushToFile ( *hash  optHash)
inline

flushToFile service method

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

◆ get()

Datasource QorusSystemDatasourceService::get ( string  name)
inline

get service method

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

◆ get_desc()

string QorusSystemDatasourceService::get_desc ( string  name)
inline

get_desc service method

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

Datasource QorusSystemDatasourceService::getDedicated ( string  name)
inline

getDedicated service method

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

◆ getPool()

DatasourcePool QorusSystemDatasourceService::getPool ( string  name)
inline

getPool service method

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

◆ getUnique()

DatasourcePool QorusSystemDatasourceService::getUnique ( string  name)
inline

getUnique service method

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

◆ reload()

QorusSystemDatasourceService::reload ( )
inline

reload service method

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

nothing QorusSystemDatasourceService::reset ( string  name)
inline

reset service method

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

auto QorusSystemDatasourceService::select ( string  name,
string  sql 
)
inline

select service method

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

auto QorusSystemDatasourceService::selectRow ( string  name,
string  sql 
)
inline

selectRow service method

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

hash QorusSystemDatasourceService::showDefaults ( )
inline

showDefaults service method

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

hash QorusSystemDatasourceService::showDefaultsWithPasswords ( )
inline

showDefaultsWithPasswords service method

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

◆ update()

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 
)
inline

update service method

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

nothing QorusSystemDatasourceService::update_hash ( string  name,
hash  h 
)
inline

update_hash service method

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

nothing QorusSystemDatasourceService::update_string ( string  name,
string  desc 
)
inline

update_string service method

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: