Qore Mapper Module Reference  1.6
Mapper::AbstractMapperIterator Class Reference

abstract base class for hash iterator mappping classes based on a mapper object and an iterator input source More...

Inheritance diagram for Mapper::AbstractMapperIterator:

Public Member Methods

 constructor (Qore::AbstractIterator iter)
 creates the iterator from the arguments passed More...
 
bool hasBulk ()
 returns True if the iterator supports bulk mode; this method returns False (the default)
 
list< hashmapBulk (int size)
 performs bulk mapping; if the iterator does not support bulk mapping then it is simulated in this method More...
 
bool next ()
 Moves the current position of the iterator to the next element; returns False if there are no more elements.
 
bool valid ()
 returns True if the iterator is currently pointing at a valid element, False if not
 

Private Attributes

Qore::AbstractIterator i
 input iterator; AbstractIterator::getValue() must return a hash
 

Detailed Description

abstract base class for hash iterator mappping classes based on a mapper object and an iterator input source

Member Function Documentation

◆ constructor()

Mapper::AbstractMapperIterator::constructor ( Qore::AbstractIterator  iter)

creates the iterator from the arguments passed

Parameters
iterinput iterator; AbstractIterator::getValue() must return a hash

◆ mapBulk()

list<hash> Mapper::AbstractMapperIterator::mapBulk ( int  size)

performs bulk mapping; if the iterator does not support bulk mapping then it is simulated in this method

Parameters
sizethe number of rows to return
Returns
a list of mapped hashes with a maximum number of rows corresponding to the size argument; in case there is less input data than requested, the list returned could have fewer rows than requested; in case there is no more data, the return value is an empty list