Defines the record iterator class for Table-based iterators.
More...
#include <AbstractDbRecordIterator.qc.dox.h>
|
| | constructor (bool release_transaction, AbstractSQLStatement stmt) |
| | creates the iterator
|
| |
|
| destructor () |
| | rolls back the transaction if a transaction lock was acquired in the constructor and keepTransactionLock() was not called
|
| |
| *AbstractDataProviderBulkRecordInterface | getBulkApi () |
| | Returns the bulk data interface.
|
| |
| *hash< string, AbstractDataField > | getRecordType () |
| | Returns the record description, if available.
|
| |
| hash< auto > | getValue () |
| | Returns a single record if the iterator is valid.
|
| |
|
| keepTransactionLock () |
| | Ensures that no rollback is performed when the object is destroyed.
|
| |
| 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.
|
| |
| bool | valid () |
| | Returns True if the iterator is valid.
|
| |
|
|
bool | release_transaction |
| | release the transaction with a rollback in the destructor?
|
| |
|
AbstractSQLStatement | stmt |
| | the statement being iterated
|
| |
Defines the record iterator class for Table-based iterators.
◆ constructor()
| DbDataProvider::AbstractDbRecordIterator::constructor |
( |
bool | release_transaction, |
|
|
AbstractSQLStatement | stmt ) |
creates the iterator
- Parameters
-
| release_transaction | release the transaction with a rollback in the destructor? |
| stmt | the SQL statement to iterate |
◆ getBulkApi()
| *AbstractDataProviderBulkRecordInterface DbDataProvider::AbstractDbRecordIterator::getBulkApi |
( |
| ) |
|
Returns the bulk data interface.
- Returns
- the bulk data interface
- Note
- This object cannot be used after this call
◆ getRecordType()
| *hash< string, AbstractDataField > DbDataProvider::AbstractDbRecordIterator::getRecordType |
( |
| ) |
|
Returns the record description, if available.
- Returns
- the record type of the query results
◆ getValue()
| hash< auto > DbDataProvider::AbstractDbRecordIterator::getValue |
( |
| ) |
|
Returns a single record if the iterator is valid.
- Exceptions
-
| INVALID-ITERATOR | the iterator is not pointing at a valid element |
◆ next()
| bool DbDataProvider::AbstractDbRecordIterator::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)
- 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 DbDataProvider::AbstractDbRecordIterator::valid |
( |
| ) |
|
Returns True if the iterator is valid.
- Returns
- True if the iterator is valid