Qore Programming Language Reference Manual  0.8.12.3
QC_HashListIterator.dox.h
1 namespace Qore {
4 
34 
35 public:
37 
46  constructor(hash h);
47 
48 public:
50 
56  constructor();
57 
58 public:
60 
65  copy();
66 
67 public:
69 
80 bool empty();
81 
82 public:
84 
97 bool first();
98 
99 public:
101 
121 any getKeyValue(string key);
122 
123 public:
125 
143 hash getRow();
144 
145 public:
147 
166 hash getValue();
167 
168 public:
170 
182 int index();
183 
184 public:
186 
199 bool last();
200 
201 public:
203 
215 int max();
216 
217 public:
219 
239 any memberGate(string key);
240 
241 public:
243 
257 bool next();
258 
259 public:
261 
275 bool prev();
276 
277 public:
279 
288  reset();
289 
290 public:
292 
304 bool set(int pos);
305 
306 public:
308 
319 bool valid();
320 };
321 };
int max()
returns the number of elements in the list
bool last()
returns True if on the last element of the list
bool next()
Moves the current position to the next element in the result list; returns False if there are no more...
bool prev()
Moves the current position to the previous element in the result list; returns False if there are no ...
any getKeyValue(string key)
Returns the current value for the column given as an argument.
bool empty()
returns True if the result list is empty; False if not
hash getValue()
returns the current row value as a hash or throws an INVALID-ITERATOR exception if the iterator is in...
This class defines an abstract interface for bidirectional iterators where the size of the object is ...
Definition: QC_AbstractQuantifiedBidirectionalIterator.dox.h:6
int index()
returns the current iterator position in the list or -1 if not pointing at a valid element ...
This class an iterator class for hashes of lists as returned by Qore::SQL::Datasource::select() and Q...
Definition: QC_HashListIterator.dox.h:33
bool set(int pos)
sets the new position in the result list; if the position is invalid then the method returns False...
hash getRow()
returns the current row value as a hash or throws an INVALID-ITERATOR exception if the iterator is in...
bool first()
returns True if on the first element of the list
bool valid()
returns True if the iterator is currently pointing at a valid element, False if not ...
any memberGate(string key)
This method allows the iterator to be dereferenced directly as a hash for the current row being itera...
reset()
Reset the iterator instance to its initial state.
main Qore-language namespace
Definition: Pseudo_QC_All.dox.h:2
hash hash(object obj)
Returns a hash of an object's members.
copy()
Creates a copy of the HashListIterator object, iterating the same object as the original and in the s...
constructor()
Creates an empty hash list iterator object.