211 "input_timezone":
True,
298 string getFieldName(
string name);
363 private error(
string fmt);
367 private error2(
string ex,
string fmt);
private mapFieldType(string key, hash m, reference v, hash rec)
performs type handling
Qore::AbstractIterator i
input iterator; AbstractIterator::getValue() must return a hash
Definition: Mapper.qm.dox.h:385
list mapAll(softlist recs)
maps all input records and returns the mapped data as a list of output records
int getCount()
returns the internal record count
private setup(hash map, *hash opts)
sets up the mapper object before checking the mapper hash
hash validTypes()
returns a list of valid field types for this class (can be overridden in subclasses) ...
private any mapSubclass(hash m, any v)
to be overridden as necessary in subclasses
constructor(Qore::AbstractIterator i)
creates the iterator from the arguments passed
bool next()
Moves the current position of the input iterator to the next element; returns False if there are no m...
const OptionKeys
constructor option keys (can be extended by subclassing and reimplementing optionKeys()) ...
Definition: Mapper.qm.dox.h:204
*code output_log
an optional output data logging callback; must accept a hash giving the output data hash ...
Definition: Mapper.qm.dox.h:183
provides a hash iterator based on a mapper object and an iterator input source
Definition: Mapper.qm.dox.h:406
string enc
the output character encoding; if not given then the output encoding is assumed to be UTF-8 ...
Definition: Mapper.qm.dox.h:171
private convertToHash(int t, string k, reference fh)
convert a field definition to a hash if possible
private checkMapField(string k, reference fh, *hash th)
perform per-field pre-processing on the passed map in the constructor
bool allow_dot
do not assume struct when field names have a "." in them; instead allow input field names to have a "...
Definition: Mapper.qm.dox.h:195
this class is a base class for mapping data; see Mapper Examples for usage examples ...
Definition: Mapper.qm.dox.h:158
hash getValue()
returns the current row transformed with the mapper
int count
count of records mapped
Definition: Mapper.qm.dox.h:201
resetCount()
resets the internal record count
constructor(Qore::AbstractIterator i, hash map, *hash opts)
creates the iterator from the arguments passed
Qore::TimeZone input_timezone
the timezone for input fields in case of parsing text values; if not set defaults to the current Time...
Definition: Mapper.qm.dox.h:189
private error2(string ex, string fmt)
throws the given exception; prepends the map name to the description if known
abstract base class for hash iterator mappping classes based on a mapper object and an iterator input...
Definition: Mapper.qm.dox.h:376
hash validKeys()
returns a list of valid field keys for this class (can be overridden in subclasses) ...
const ValidKeys
default known mapper hash field keys (can be extended by subclassing and reimplementing validKeys()) ...
Definition: Mapper.qm.dox.h:218
private checkMap()
verifies the input map in the constructor
private error(string fmt)
throws a MAP-ERROR exception; prepends the map name to the description if known
*Qore::TimeZone timezone
an optional timezone for output date fields
Definition: Mapper.qm.dox.h:186
bool trunc_all
truncate all option
Definition: Mapper.qm.dox.h:192
const ValidTypes
default known field types (can be extended by subclassing and reimplementing validTypes() and mapFiel...
Definition: Mapper.qm.dox.h:231
hash mapData(hash rec)
processes the input record and returns a hash of the mapped values where the keys in the hash returne...
*hash crec
constant hash value for output mappings
Definition: Mapper.qm.dox.h:198
*code trunc
an optional field truncation callback
Definition: Mapper.qm.dox.h:177
private checkTimezoneOption(hash opts, string rn)
verifies a timezone constructor option
Mapper::Mapper map
data mapper
Definition: Mapper.qm.dox.h:415
private constructor()
private constructor for subclasses
*string name
the optional name for the object (for example a table name); will be prepended to field names in erro...
Definition: Mapper.qm.dox.h:174
int getCount()
returns the internal record count
hash optionKeys()
returns a list of valid constructor options for this class (can be overridden in subclasses) ...
hash map
the hash providing output field names and mappings
Definition: Mapper.qm.dox.h:168
*code input_log
an optional input data logging callback; must accept a hash giving the input data hash ...
Definition: Mapper.qm.dox.h:180
bool valid()
returns True if the input iterator is currently pointing at a valid element, False if not ...
private bool hasMapping(hash fh)
returns True if the field has a mapping, False if not
resetCount()
resets the internal record count