| Qore DataProvider Module Reference 1.2.1

Public Member Functions | Protected Member Functions | Static Protected Member Functions | List of all members
DataProvider::AbstractDataProviderRecordIterator Class Referenceabstract

Defines the abstract class for data provider iterators; the destructor releases the iterator. More...

Inheritance diagram for DataProvider::AbstractDataProviderRecordIterator:
[legend]

## Public Member Functions
*AbstractDataProviderBulkRecordInterface | getBulkApi ()
| Returns the bulk data interface if supported. More...
*hash< string, AbstractDataField > | getRecordType ()
| Returns the record description, if available. More...
abstract hash< auto > | getValue ()
| returns a single record if the iterator is valid More...
bool | supportsBulkApi ()
| Returns True if the iterator supports bulk operation. More...

## Protected Member Functions
auto | doMemberGate (string key)
| Returns the value of the given field in the current record, if the iterator is valid. More...

## Static Protected Member Functions
static bool | matchGeneric (hash< auto > record, *hash< auto > where_cond)
| Checks if the current record matches the search criteria. More...
static bool | matchGenericValue (auto expects, auto val)
| Match a single value. More...

## Detailed Description

Defines the abstract class for data provider iterators; the destructor releases the iterator.

## Member Function Documentation

## ◆ doMemberGate()

auto DataProvider::AbstractDataProviderRecordIterator::doMemberGate | ( | string | key | ) |
| protected

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

Parameters

  key | the name of the field

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

Exceptions

  FIELD-ERROR | invalid or unknown field name

## ◆ getBulkApi()

*AbstractDataProviderBulkRecordInterface DataProvider::AbstractDataProviderRecordIterator::getBulkApi | ( |  | ) |

Returns the bulk data interface if supported.

Returns
  the bulk data interface if supported

Note
  This base class method returns NOTHING by default

## ◆ getRecordType()

*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

## ◆ getValue()

abstract hash<auto> DataProvider::AbstractDataProviderRecordIterator::getValue | ( |  | ) |
| pure virtual

returns a single record if the iterator is valid

Exceptions

  INVALID-ITERATOR | the iterator is not pointing at a valid element

Implemented in DataProvider::DataProviderBulkRecordIterator, and DataProvider::DefaultRecordIterator.

## ◆ matchGeneric()

static bool DataProvider::AbstractDataProviderRecordIterator::matchGeneric | ( | hash< auto > | record,
|  | *hash< auto > | where_cond
| ) |  |
| static protected

Checks if the current record matches the search criteria.

in case of a hash value, a recursive partial match with only the keys given in the value to be checked is performed

## ◆ matchGenericValue()

static bool DataProvider::AbstractDataProviderRecordIterator::matchGenericValue | ( | auto | expects,
|  | auto | val
| ) |  |
| static protected

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

## ◆ supportsBulkApi()

bool DataProvider::AbstractDataProviderRecordIterator::supportsBulkApi | ( |  | ) |

Returns True if the iterator supports bulk operation.

Returns
  True if the iterator supports bulk operation

Note
  This base class method returns False by default