Qorus Integration Engine® Enterprise Edition 6.0.27_prod
Loading...
Searching...
No Matches
OMQ::DbRemoteBase Class Reference

A high level API for remote system.sqlutil service calls. More...

Inheritance diagram for OMQ::DbRemoteBase:
[legend]
Collaboration diagram for OMQ::DbRemoteBase:
[legend]

Public Member Methods

 constructor (string remote, string dsname, *hash< auto > opts)
 constructor taking a string giving the name of the remote connection for the remote server More...
 
 constructor (QorusSystemRestHelper remote, string dsname, *hash< auto > opts)
 constructor taking an OMQ::QorusSystemRestHelper object for the remote connection More...
 
 destructor ()
 Just check if the transaction finished correctly.
 
 beginTransaction ()
 starts or continues a remote transaction More...
 
string datasourceName ()
 returns the remote datasource name specified in constructor
 
OMQ::StreamConfig config ()
 returns the configuration object
 
bool inTransaction ()
 Returns True if a remote transaction is in progress. More...
 
 commit ()
 commits a remote transaction
 
 rollback (bool action=AbstractParallelStream::DO_DISCONNECT)
 Rollback remote transaction. More...
 
 disconnect ()
 Disconnects the connection.
 
auto methodGateArgs (string method, *list< auto > args)
 Redirects the method to the remote service and prepends the datasource name to the arguments in the remote call.
 
auto methodGate (string method)
 Redirects the method to the remote service and prepends the datasource name to the arguments in the remote call.
 

Detailed Description

A high level API for remote system.sqlutil service calls.

DbRemoteBase provides a high level API for the system.sqlutil service in remote Qorus instances. Use it for single updates, deletes, inserts, and/or schema management.

DbRemoteBase wraps all available system.sqlutil service methods with the following changes in service methods API:

Warning
Use OMQ::DbRemoteSend and OMQ::DbRemoteReceive for inserting and fetching large amount of data. These classes are optimized for high volume data. Any use of e.g. DbRemote::select() will store all resulting data in the memory and it will be transferred in a single call.
See also
DbRemote for a child class that automatically wraps all actions in a remote transaction
Since
Qorus 4.1

Member Function Documentation

◆ beginTransaction()

OMQ::DbRemoteBase::beginTransaction ( )

starts or continues a remote transaction

This method is called from the constructor() automatically

◆ constructor() [1/2]

OMQ::DbRemoteBase::constructor ( QorusSystemRestHelper  remote,
string  dsname,
*hash< auto >  opts 
)

constructor taking an OMQ::QorusSystemRestHelper object for the remote connection

Parameters
remotean OMQ::QorusSystemRestHelper object
dsnamea string with name of the remote datasource to use
optsoptional Streaming API Constructor Options as follows:
  • "timeout": an HTTP socket timeout value in milliseconds; used locally and in the remote for socket I/O and queue operations; default value: 5m
  • "loglevel": a default log level option for logging; see Log Levels for valid value
  • "no_remote_timeout": if True the "timeout" option will not be sent to the remote
Note
the explicit or default timeout value here overrides any socket I/O timeout set for the remote connection object

◆ constructor() [2/2]

OMQ::DbRemoteBase::constructor ( string  remote,
string  dsname,
*hash< auto >  opts 
)

constructor taking a string giving the name of the remote connection for the remote server

Parameters
remotea string giving the name of the remote connection for the remote server
dsnamea string with name of the remote datasource to use
optsoptional Streaming API Constructor Options as follows:
  • "timeout": an HTTP socket timeout value in milliseconds; used locally and in the remote for socket I/O and queue operations; default value: 5m
  • "loglevel": a default log level option for logging; see Log Levels for valid value
  • "no_remote_timeout": if True the "timeout" option will not be sent to the remote
Note
the explicit or default timeout value here overrides any socket I/O timeout set for the remote connection object

◆ inTransaction()

bool OMQ::DbRemoteBase::inTransaction ( )

Returns True if a remote transaction is in progress.

Returns
True if a remote transaction is in progress

◆ rollback()

OMQ::DbRemoteBase::rollback ( bool  action = AbstractParallelStream::DO_DISCONNECT)

Rollback remote transaction.

Note
it's normally better to disconnect the connection if an error occurs rather than call rollback() when streaming because if a chunked transfer is interrupted, then HTTP calls will fail anyway, and the remote end will rollback the transaction in any case unless an explicit commit is executed
Parameters
actionan optional bool value to keep connection open or close the connection. Connection closing is the default
See also
DO_DISCONNECT
DONT_DISCONNECT
disconnect()

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