257 const ConstantConflictList = (
"name",
"struct",
"code",
"default");
261 "allow_dot":
"allows input fields to have a dot in their name without implying a structured format",
262 "allow_output_dot":
"allows output fields to have a dot in their name without implying a structured format",
263 "date_format":
"gives the default format for parsing dates from strings; ex: \"MM/DD/YYYY HH:mm:SS\"",
264 "encoding":
"gives the default output character encoding for string fields",
265 "info_log":
"a call reference / closure for informational logging",
266 "input":
"a hash describing the input record",
267 "input_log":
"a call reference / closure for input record logging",
268 "input_timezone":
"the default timezone to assume when parsing input dates",
269 "name":
"the name of the Mapper object",
270 "number_format":
"the default number format when parsing number fields from strings; ex: \".,\"",
271 "output":
"a hash describing the output record",
272 "output_log":
"a call reference / closure for input record logging",
273 "timezone":
"the default output timezone for date/time values",
274 "runtime":
"runtime options as a hash (see also setRuntime(), replaceRuntime())",
275 "empty_strings_to_nothing":
"converts out record's empty strings and into NOTHING - actually the value is deleted",
292 "number_format":
True,
294 "empty_strings_to_nothing" :
True,
327 string encoding =
"utf-8";
379 bool m_empty_strings_to_nothing =
False;
446 convertToHash(
int t,
string k, reference<any> fh);
453 checkInputField(
string k,
string name);
463 checkMapField(
string k, reference<any> fh);
470 checkTimezoneOption(
hash opts,
string rn);
493 setRuntime(
string key,
auto value);
515 setRuntime(
hash runtime);
537 replaceRuntime(*
hash runtime);
552 auto getRuntime(
string key);
556 string getFieldName(
string fname);
578 *
hash getInputRecord();
582 *
hash getOutputRecord();
595 list<hash> mapAll(
list recs);
608 list<hash> mapAll(
hash recs);
675 nothing mapFieldIntern(reference<hash> h,
string key,
hash rec,
bool do_list,
int list_size);
682 string truncateField(
string k,
string val,
int ix,
int sze,
int maxlen);
689 fieldLengthError(
string k,
string val,
int ix,
int sze,
int maxlen,
hash rc);
712 mapFieldType(
string key,
hash m, reference<any> v,
hash rec);
728 error2(
string ex,
string fmt);
735 auto mapSubclass(
hash m,
auto v);
Qore::AbstractIterator i
input iterator; AbstractIterator::getValue() must return a hash
Definition: Mapper.qm.dox.h:750
*string date_format
the global date format for parsing dates
Definition: Mapper.qm.dox.h:357
Mapper::Mapper mapc
data mapper
Definition: Mapper.qm.dox.h:791
hash mapd
the hash with a subset of the mappings used dynamically
Definition: Mapper.qm.dox.h:321
bool next()
Moves the current position of the iterator to the next element; returns False if there are no more el...
hash consth
map of constant fields
Definition: Mapper.qm.dox.h:388
*code output_log
an optional output data logging callback; must accept a hash giving the output data hash ...
Definition: Mapper.qm.dox.h:339
*code info_log
an optional info logging callback; must accept a sprintf()-style format specifier and optional argume...
Definition: Mapper.qm.dox.h:333
provides a hash iterator based on a mapper object and an iterator input source
Definition: Mapper.qm.dox.h:782
this class is a base class for mapping data; see Mapper Examples for usage examples ...
Definition: Mapper.qm.dox.h:252
hash mapc
the hash providing output field names and mappings
Definition: Mapper.qm.dox.h:318
hash getValue()
returns the current row transformed with the mapper
hash mapo
the hash of output records for key order
Definition: Mapper.qm.dox.h:324
constructor(Qore::AbstractIterator i, hash mapv, *hash opts)
creates the iterator from the arguments passed
list< hash > mapBulk(int size)
performs bulk mapping; if the iterator does not support bulk mapping then it is simulated in this met...
*string number_format
the global number format for parsing numbers
Definition: Mapper.qm.dox.h:360
abstract base class for hash iterator mappping classes based on a mapper object and an iterator input...
Definition: Mapper.qm.dox.h:741
*list identl
list of fields to be mapped 1:1 input -> output
Definition: Mapper.qm.dox.h:385
hash identh
map of fields to be mapped 1:1 input -> output
Definition: Mapper.qm.dox.h:382
*Qore::TimeZone timezone
an optional timezone for output date fields
Definition: Mapper.qm.dox.h:342
constructor(Qore::AbstractIterator iter)
creates the iterator from the arguments passed
*hash output
an optional description of the output data structure
Definition: Mapper.qm.dox.h:366
the Mapper namespace contains all the definitions in the Mapper module
Definition: Mapper.qm.dox.h:250
bool hasBulk()
returns True if the iterator supports bulk mode; this method returns False (the default) ...
*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:330
int getCount()
returns the internal record count
*hash input
an optional description of possible input hash keys
Definition: Mapper.qm.dox.h:363
*code input_log
an optional input data logging callback; must accept a hash giving the input data hash ...
Definition: Mapper.qm.dox.h:336
hash rconsth
map of constant runtime fields
Definition: Mapper.qm.dox.h:391
bool valid()
returns True if the iterator is currently pointing at a valid element, False if not ...
*hash m_runtime
current runtime values
Definition: Mapper.qm.dox.h:374
resetCount()
resets the internal record count