Qorus Integration Engine® Community Edition 6.0.0_dev
Loading...
Searching...
No Matches
RemoteDbDataProvider::AbstractRemoteDbRecordIterator Class Reference

Defines a buffered record iterator class for remote database connections; uses multiplexed I/O. More...

Inheritance diagram for RemoteDbDataProvider::AbstractRemoteDbRecordIterator:
[legend]

Public Member Methods

 constructor (bool release_transaction, DbRemoteReceive recv)
 Creates the iterator. More...
 
 destructor ()
 Rolls back the transaction if a transaction lock was acquired in the constructor and keepTransactionLock() was not called.
 
bool valid ()
 Returns True if the iterator is valid. More...
 
bool next ()
 Increments the row pointer when retrieving rows from a select statement; returns True if there is a row to retrieve, False if not. More...
 
hash< auto > getValue ()
 Returns a single record if the iterator is valid. More...
 
 keepTransactionLock ()
 Ensures that no rollback is performed when the object is destroyed.
 
auto memberGate (string key)
 Returns the value of the given field in the current row, if the iterator is valid. More...
 

Private:Internal Member Methods

bool nextRecordSet ()
 gets the next record set and sets up the iterator to point at the next record
 

Private:Internal Attributes

DbRemoteReceive recv
 The remote select stream.
 
HashListIterator i
 Current record iterator.
 
bool done = False
 Done flag.
 
bool release_transaction
 Release the transaction with a rollback in the destructor?
 

Detailed Description

Defines a buffered record iterator class for remote database connections; uses multiplexed I/O.

See also
DbRemoteReceive for more information

Member Function Documentation

◆ constructor()

RemoteDbDataProvider::AbstractRemoteDbRecordIterator::constructor ( bool  release_transaction,
DbRemoteReceive  recv 
)

Creates the iterator.

Parameters
release_transactionrelease the transaction with a rollback in the destructor?
recvthe remote select stream

◆ getValue()

hash< auto > RemoteDbDataProvider::AbstractRemoteDbRecordIterator::getValue ( )

Returns a single record if the iterator is valid.

Exceptions
INVALID-ITERATORthe iterator is not pointing at a valid element

◆ memberGate()

auto RemoteDbDataProvider::AbstractRemoteDbRecordIterator::memberGate ( string  key)

Returns the value of the given field in the current row, if the iterator is valid.

Parameters
keythe name of the field
Returns
the value of the given field in the current row, if the iterator is valid
Exceptions
FIELD-ERRORinvalid or unknown field name

◆ next()

bool RemoteDbDataProvider::AbstractRemoteDbRecordIterator::next ( )

Increments the row pointer when retrieving rows from a select statement; returns True if there is a row to retrieve, False if not.

Returns
True if there is a row to retrieve, False if not (no more rows to be retrieved)
Exceptions
INVALID-ITERATORthe iterator is not pointing at a valid element
Note
Exceptions could be thrown by the DBI driver when the statement is executed; see the relevant DBI driver docs for more information

◆ valid()

bool RemoteDbDataProvider::AbstractRemoteDbRecordIterator::valid ( )

Returns True if the iterator is valid.

Returns
True if the iterator is valid

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