![]() |
Qore DataProvider Module Reference 3.3.0
|
Defines the abstract class for data provider iterators; the destructor releases the iterator. More...
#include <AbstractDataProviderRecordIterator.qc.dox.h>
Public Member Methods | |
| constructor (*bool requires_result, *int max_records) | |
| Creates the object and optionally sets the bulk iteration block size. | |
| *AbstractDataProviderBulkRecordInterface | getBulkApi (int block_size=DefaultBlockSize) |
| Returns the bulk data interface if supported. | |
| *int | getMaxRecords () |
| Returns the 'max_records' value. | |
| int | getRecordCount () |
| Returns the number of records returned so far. | |
| *hash< string, AbstractDataField > | getRecordType () |
| Returns the record description, if available. | |
| abstract hash< auto > | getValue () |
| returns a single record if the iterator is valid | |
| bool | next () |
| Positions the iterator on the next record if possible, returns True if successful. | |
| bool | requiresResult () |
| Returns the 'requires_result' flag. | |
| bool | supportsBulkApi () |
| Returns True if the iterator supports bulk operation. | |
Public Attributes | |
| const | DefaultBlockSize = 1000 |
| Default block size. | |
Private Member Methods | |
| auto | doMemberGate (string key) |
| Returns the value of the given field in the current record, if the iterator is valid. | |
| abstract bool | nextImpl () |
| Positions the iterator on the next record if possible, returns True if successful. | |
Static Private Member Methods | |
| static bool | evalOperator (string field, hash< auto > cmd, hash< auto > op, hash< auto > record) |
| Evaluates a generic search operator on the field value and record and returns the result. | |
| static bool | matchGeneric (hash< auto > record, *hash< auto > where_cond) |
| Checks if the current record matches the search criteria. | |
| static bool | matchGeneric (hash< auto > record, hash< DataProviderExpression > where_cond) |
| Checks if the current record matches the search criteria. | |
| static bool | matchGenericValue (auto expects, auto val) |
| Match a single value. | |
Private Attributes | |
| *int | max_records |
| Max records. | |
| int | record_count = 0 |
| Number of records returned. | |
| bool | requires_result |
| Requires result. | |
Defines the abstract class for data provider iterators; the destructor releases the iterator.
this class also implements generic search APIs that can be used to filter record sets for data providers that do not support native search / filtering APIs
|
private |
Returns the value of the given field in the current record, if the iterator is valid.
| key | the name of the field |
| FIELD-ERROR | invalid or unknown field name |
| *AbstractDataProviderBulkRecordInterface DataProvider::AbstractDataProviderRecordIterator::getBulkApi | ( | int | block_size = DefaultBlockSize | ) |
Returns the bulk data interface if supported.
| *hash< string, AbstractDataField > DataProvider::AbstractDataProviderRecordIterator::getRecordType | ( | ) |
Returns the record description, if available.
This base class method returns NOTHING; reimplement in subclasses to provide a record type
| abstract hash< auto > DataProvider::AbstractDataProviderRecordIterator::getValue | ( | ) |
returns a single record if the iterator is valid
| INVALID-ITERATOR | the iterator is not pointing at a valid element |
|
staticprivate |
Checks if the current record matches the search criteria.
in case of a hash value, if the hash was created by a search operator function, then that search operation is applied to the input, otherwise a recursive partial match with only the keys given in the value to be checked is performed
|
staticprivate |
Checks if the current record matches the search criteria.
in case of a hash value, if the hash was created by a search operator function, then that search operation is applied to the input, otherwise a recursive partial match with only the keys given in the value to be checked is performed
|
staticprivate |
Match a single value.
in case of a hash value, a recursive partial match with only the keys given in the value to be checked is performed
| bool DataProvider::AbstractDataProviderRecordIterator::next | ( | ) |
Positions the iterator on the next record if possible, returns True if successful.
| NO-DATA | no data available to return and requires_result is set |
| MAX-RECORDS-EXCEEDED | the maximum number of records has been exceeded as set by max_records |
|
private |