Qorus Integration Engine® Enterprise Edition 6.0.15_prod
Loading...
Searching...
No Matches
OMQ::Client Namespace Reference

objects that are also present in the server with the same names are created under the OMQ::Client namespace More...

Classes

class  ClientPropServiceMethodGateHelper
 this class provides an easy way to call service methods on a Qorus server; will redirect system property APIs to local DB-based functions in case Qorus is down More...
 
class  DatasourceConnections
 Qorus client library class used to handle DATASOURCE connections. More...
 
class  QorusClientSystemServiceHelper
 mid-level class in the client for transparently redirecting calls to services; will redirect system property APIs to local DB-based functions in case Qorus is down More...
 
class  QorusLocalRestHelper
 class for local REST API calls More...
 
class  QorusSystemAPIHelper
 class to call the system API from the client library More...
 
class  QorusSystemRestHelper
 class to call the system REST API from the client library More...
 
class  RemoteConnections
 Qorus client library class used to handle REMOTE connections. More...
 
class  UserConnections
 Qorus client library class to handle USER connections. More...
 

Functions

OMQ::Client::QorusSystemRestHelper get_remote_rest_connection (string name, bool connect=True, bool register_dependency=True)
 Returns a new QorusSystemRestHelper object corresponding to a defined Qorus remote connection. More...
 
OMQ::Client::QorusSystemAPIHelper get_remote_rpc_connection (string name, bool connect=True, bool register_dependency=True)
 Returns a new QorusSystemAPIHelper object corresponding to a defined Qorus remote connection. More...
 
Qore::SQL::DatasourcePool get_datasource_pool (string name, bool register_dependency=True)
 returns a DatasourcePool object for the given datasource name More...
 
Qore::SQL::Datasource get_datasource_dedicated (string name, bool register_dependency=True)
 returns a new, dedicated Datasource object, suitable for transaction management for long-running transactions More...
 
SqlUtil::AbstractTable get_sql_table (string datasource, string table_name)
 creates and returns a table object; there is no cache implementation in the client; this function is here for compatibility with server code and convenience in the client library More...
 
SqlUtil::AbstractTable get_sql_table (AbstractDatasource ds, string table_name)
 creates and returns a table object; there is no cache implementation in the client; this function is here for compatibility with server code and convenience in the client library More...
 
SqlUtil::AbstractTable get_sql_table_system (string datasource, string table_name)
 in the client library equal to get_sql_table(string, string) More...
 
SqlUtil::AbstractTable get_sql_table_system (AbstractDatasource ds, string table_name)
 in the client library equal to get_sql_table(AbstractDatasource, string) More...
 
object get_user_connection (string name, bool connect=True, bool register_dependency=True, *hash rtopts)
 Returns an object corresponding to a defined user connection. More...
 
hash< auto > prop_get ()
 returns a hash of all system properties in all domains More...
 
*hash< auto > prop_get (string domain)
 returns a hash of all key-value pairs in the given domain or NOTHING if the system property domain does not exist More...
 
auto prop_get (string domain, string key)
 returns the value of the given system property key in the given domain or NOTHING if the system property does not exist More...
 
 qorus_client_init ()
 the client initialization function where any errors cause an error message to be displayed and exit() is called More...
 
 qorus_client_init2 ()
 the main client initialization function; other functions call this one to initialize the client library More...
 
hash qorus_parse_options (string domain)
 option-parsing function: parses the option file More...
 
hash qorus_parse_options ()
 option-parsing function: parses the option file More...
 
auto qorus_get_system_option (string opt)
 returns the value of the given Qorus system option (in the "qorus" domain) More...
 
hash qorus_get_system_options ()
 returns the value of all Qorus system options (in the "qorus" domain) More...
 

Detailed Description

objects that are also present in the server with the same names are created under the OMQ::Client namespace

Function Documentation

◆ get_datasource_dedicated()

Qore::SQL::Datasource OMQ::Client::get_datasource_dedicated ( string  name,
bool  register_dependency = True 
)

returns a new, dedicated Datasource object, suitable for transaction management for long-running transactions

Parameters
namethe name of the datasource
register_dependencyunused in client code; it is here for server-side API compatibility.
Returns
a new, dedicated Datasource object, suitable for transaction management for long-running transactions
Exceptions
DATASOURCE-ERRORThe given connection is not known or is a system datasource
Note
This function initializes the client library implicitly
See also
get_datasource_pool()
Since
Qorus 3.1

◆ get_datasource_pool()

Qore::SQL::DatasourcePool OMQ::Client::get_datasource_pool ( string  name,
bool  register_dependency = True 
)

returns a DatasourcePool object for the given datasource name

Parameters
namethe name of the datasource
register_dependencyunused in client code; it is here for server-side API compatibility.
Returns
a DatasourcePool object
Exceptions
DATASOURCE-ERRORunknown or system datasource
Note
This function initializes the client library implicitly
See also
get_datasource_dedicated()
Since
Qorus 3.1

◆ get_remote_rest_connection()

OMQ::Client::QorusSystemRestHelper OMQ::Client::get_remote_rest_connection ( string  name,
bool  connect = True,
bool  register_dependency = True 
)

Returns a new QorusSystemRestHelper object corresponding to a defined Qorus remote connection.

Parameters
namethe name of the connection
connectunused in client code; it is here for server-side API compatibility.
register_dependencyunused in client code; it is here for server-side API compatibility.
Returns
a new QorusSystemRestHelper object
Exceptions
GET-REMOTE-ERRORThe given connection is not known
See also
get_remote_rpc_connection()
Note
This function initializes the client library implicitly
Since
Qorus 3.1

◆ get_remote_rpc_connection()

OMQ::Client::QorusSystemAPIHelper OMQ::Client::get_remote_rpc_connection ( string  name,
bool  connect = True,
bool  register_dependency = True 
)

Returns a new QorusSystemAPIHelper object corresponding to a defined Qorus remote connection.

Parameters
namethe name of the connection
connectunused in client code; it is here for server-side API compatibility.
register_dependencyunused in client code; it is here for server-side API compatibility.
Returns
a new QorusSystemAPIHelper object
Exceptions
GET-REMOTE-ERRORThe given connection is not known
See also
get_remote_rest_connection()
Note
This function initializes the client library implicitly
Since
Qorus 3.1

◆ get_sql_table() [1/2]

SqlUtil::AbstractTable OMQ::Client::get_sql_table ( AbstractDatasource  ds,
string  table_name 
)

creates and returns a table object; there is no cache implementation in the client; this function is here for compatibility with server code and convenience in the client library

Example:
SqlUtil::AbstractTable t = get_sql_table(ds, "my_table");
Parameters
dsa Qore::SQL::AbstractDatasource object
table_namethe name of the table to be acquired; the handling of this parameter is identical to that in SqlUtil::Table::constructor()
Returns
an SqlUtil::AbstractTable object corresponding to the parameters
Note
other exceptions can be thrown when acquiring the table, for example if the given table is not accessible or if there are technical errors communicating with the database server, etc
Since
Qorus 3.1.0

◆ get_sql_table() [2/2]

SqlUtil::AbstractTable OMQ::Client::get_sql_table ( string  datasource,
string  table_name 
)

creates and returns a table object; there is no cache implementation in the client; this function is here for compatibility with server code and convenience in the client library

Example:
SqlUtil::AbstractTable t = get_sql_table(ds_name, "my_table");
Parameters
datasourcea string with a name of a Datasource Connections
table_namethe name of the table to be acquired; the handling of this parameter is identical to that in SqlUtil::Table::constructor()
Returns
an SqlUtil::AbstractTable object corresponding to the parameters
Exceptions
INVALID-DATASOURCEthis exception is thrown if the datasource argument cannot be matched to a known Qorus datasourceā€
Note
other exceptions can be thrown when acquiring the table, for example if the given table is not accessible or if there are technical errors communicating with the database server, etc
Since
Qorus 3.1.0

◆ get_sql_table_system() [1/2]

SqlUtil::AbstractTable OMQ::Client::get_sql_table_system ( AbstractDatasource  ds,
string  table_name 
)

in the client library equal to get_sql_table(AbstractDatasource, string)

Since
Qorus 3.1.0

◆ get_sql_table_system() [2/2]

SqlUtil::AbstractTable OMQ::Client::get_sql_table_system ( string  datasource,
string  table_name 
)

in the client library equal to get_sql_table(string, string)

Example:
SqlUtil::AbstractTable t = get_sql_table("my-datasource", "my_table");
Parameters
datasourcethe name of a valid Qorus datasource
table_namethe name of the table to be acquired; the handling of this parameter is identical to that in SqlUtil::Table::constructor()
Returns
an SqlUtil::AbstractTable object corresponding to the parameters
Note
other exceptions can be thrown when acquiring the table, for example if the given table is not accessible or if there are technical errors communicating with the database server, etc
Since
Qorus 3.1.0

◆ get_user_connection()

object OMQ::Client::get_user_connection ( string  name,
bool  connect = True,
bool  register_dependency = True,
*hash  rtopts 
)

Returns an object corresponding to a defined user connection.

Parameters
namethe name of the connection
connectif False an unconnected object will be returned, otherwise the object is already connected
register_dependencyunused in client code; it is here for server-side API compatibility
rtoptsany runtime options accepted by the connection
Returns
the object representing the connection
Exceptions
CONNECTION-ERRORThe given connection is not known
See also
QorusClientAPI::getUserConnection()
Since
Qorus 3.1.0

◆ prop_get() [1/3]

hash< auto > OMQ::Client::prop_get ( )

returns a hash of all system properties in all domains

Example:
hash h = prop_get();
Returns
a hash of all system properties in all domains; the top-level keys are domain keys which have as values hashes with all key-value pairs set in the domain
Since
Qorus 3.1.0

◆ prop_get() [2/3]

*hash< auto > OMQ::Client::prop_get ( string  domain)

returns a hash of all key-value pairs in the given domain or NOTHING if the system property domain does not exist

Example:
*hash h = prop_get(domain);
Returns
a hash of all key-value pairs in the given domain or NOTHING if the system property domain does not exist
Since
Qorus 3.1.0

◆ prop_get() [3/3]

auto OMQ::Client::prop_get ( string  domain,
string  key 
)

returns the value of the given system property key in the given domain or NOTHING if the system property does not exist

Example:
auto val = prop_get(domain, key);
Returns
the value of the given system property key in the given domain
Since
Qorus 3.1.0

◆ qorus_client_init()

OMQ::Client::qorus_client_init ( )

the client initialization function where any errors cause an error message to be displayed and exit() is called

Actually implemented by QorusClient::init()

See also

◆ qorus_client_init2()

OMQ::Client::qorus_client_init2 ( )

the main client initialization function; other functions call this one to initialize the client library

Actually implemented by QorusClient::init2()

See also

◆ qorus_get_system_option()

auto OMQ::Client::qorus_get_system_option ( string  opt)

returns the value of the given Qorus system option (in the "qorus" domain)

This function calls QorusClient::init() to ensure the client library is initialized

Returns
the value of the given Qorus system option (in the "qorus" domain) or NOTHING if the option is not set or is unknown
Since
Qorus 3.1.0

◆ qorus_get_system_options()

hash OMQ::Client::qorus_get_system_options ( )

returns the value of all Qorus system options (in the "qorus" domain)

This function calls QorusClient::init() to ensure the client library is initialized

Returns
a hash of all system options in the "qorus" domain
Since
Qorus 3.1.0

◆ qorus_parse_options() [1/2]

hash OMQ::Client::qorus_parse_options ( )

option-parsing function: parses the option file

Actually implemented by QorusClient::parseOptions()

This function calls QorusClient::init() to ensure the client library is initialized

Returns
a hash of hashes; the first level hash key represents the domain, the second level is the option=value within that option domain

◆ qorus_parse_options() [2/2]

hash OMQ::Client::qorus_parse_options ( string  domain)

option-parsing function: parses the option file

Actually implemented by QorusClient::parseOptions()

This function calls QorusClient::init() to ensure the client library is initialized

Returns
a hash of the options in the given domain