Qore MapperUtil Module Reference 1.0.1
|
Describes a runtime mapper field key. More...
#include <MapperUtil.qm.dox.h>
Public Attributes | |
*hash< string, bool > | conflicting_keys |
Hash of conflicting keys, if any. | |
string | desc |
A description of the key. | |
*code | handler |
The code to handle the key at runtime. More... | |
bool | requires_field_type = False |
If the type of the value for the key must be the same as the field type. | |
*softlist< string > | requires_roles |
If the key can only be used if one or more other keys supplying the given roles are also present. | |
*string | returns_type |
If the key provides a value that returns a specific type. | |
*softlist< string > | unique_roles |
If the key provides some unique functionality. More... | |
string | value_type = "string" |
The type of value that must be assigned to this key. | |
Describes a runtime mapper field key.
*code Mapper::MapperRuntimeKeyInfo::handler |
The code to handle the key at runtime.
the signature of this closure or call reference depends on requires_roles:
auto sub (auto arg, auto val, hash<auto> ctx, *reference<bool> missing_input) {}
arg:
the argument to the runtime key in the mappingval:
the current value of the mapping, if anyctx:
mapper context info; will contain at least the following fields:output-key
: (string) provides the name of the output field currently being mappedinput:
(hash) the current input recordmissing_input:
an output variable; set to True if the handler could not resolve the value because input was missingauto sub (auto arg, hash<auto> ctx, *reference<bool> missing_input) {}
arg:
the argument to the runtime key in the mappingctx:
mapper context info; will contain at least the following fields:output-key
: (string) provides the name of the output field currently being mappedinput:
(hash) the current input recordmissing_input:
an output variable; set to True if the handler could not resolve the value because input was missingIn both cases the return value is the value to use for the field
*softlist<string> Mapper::MapperRuntimeKeyInfo::unique_roles |
If the key provides some unique functionality.
only one key providing the given functionality can be included in an output field; this is a list so that keys can provide more than one unique function