| Qore DataProvider Module Reference 2.7.1

DefaultRecordIterator.qc.dox.h
1 // -*- mode: c++; indent-tabs-mode: nil -*-
3
26 namespace DataProvider {
28
30 class DefaultRecordIterator : public AbstractDataProviderRecordIterator {
31
32 public:
33 protected:
34 AbstractIterator i;
35 *hash<auto> where_cond;
36 *hash<auto> search_options;
37 *hash<string, AbstractDataField> record_type;
38 int count = 0;
39 *string subrecord;
40
41 public:
42
44
50 constructor(AbstractIterator i, *hash<auto> where_cond, *hash<auto> search_options,
51 *hash<string, AbstractDataField> record_type, *string subrecord) {
52 self.i = i;
53 self.where_cond = where_cond;
54 if (exists search_options.columns && search_options.columns.typeCode() != NT_LIST);
55
56 self.search_options = search_options;
57 self.record_type = record_type;
58 self.subrecord = subrecord;
59 }
60
62
69 bool next();
70
71
73
75 bool valid();
76
77
79
81 hash<auto> getValue();
82
83
85
91 auto memberGate(string key);
92
93
95
97 *hash<string, AbstractDataField> getRecordType();
98
99 };
100 };
DataProvider::AbstractDataProviderRecordIterator
Defines the abstract class for data provider iterators; the destructor releases the iterator.
Definition: AbstractDataProviderRecordIterator.qc.dox.h:339
DataProvider::DefaultRecordIterator
Default record iterator class for data providers that do not support custom read / search APIs.
Definition: DefaultRecordIterator.qc.dox.h:30
DataProvider::DefaultRecordIterator::valid
bool valid()
returns True if the iterator is currently pointing at a valid element, False if not
DataProvider::DefaultRecordIterator::memberGate
auto memberGate(string key)
Returns the value of the given field in the current record, if the iterator is valid.
DataProvider::DefaultRecordIterator::next
bool next()
Moves the current position to the next element; returns False if there are no more elements.
DataProvider::DefaultRecordIterator::constructor
constructor(AbstractIterator i, *hash< auto > where_cond, *hash< auto > search_options, *hash< string, AbstractDataField > record_type, *string subrecord)
Returns an iterator for zero or more records matching the search options.
Definition: DefaultRecordIterator.qc.dox.h:50
DataProvider::DefaultRecordIterator::getRecordType
*hash< string, AbstractDataField > getRecordType()
Returns the record description, if available.
DataProvider::DefaultRecordIterator::getValue
hash< auto > getValue()
returns a single record if the iterator is valid
exists
bool exists(...)
NT_LIST
const NT_LIST
DataProvider
Qore AbstractDataField class definition.
Definition: AbstractDataField.qc.dox.h:27