Qore FixedLengthUtil Module Reference
1.1
|
Writer for fixed-length line output files. More...
Public Member Methods | |
constructor (string file_name, hash specs, *hash opts) | |
Instantiates the FixedLengthFileWriter object. More... | |
string | getFileName () |
Return the file name (including path, if used) | |
write (hash line) | |
Renders a single line for a single input record hash to the output file. More... | |
write (list lines) | |
iterates the input records and writes rendered versions of all input records to the file More... | |
write (Qore::AbstractIterator lines) | |
iterates the input records and writes rendered versions of all input records to the file More... | |
Public Member Methods inherited from FixedLengthUtil::FixedLengthAbstractWriter | |
bool | checkTransition (*string from, *string to) |
A verification function to be called for each line. This method can be overridden to achieve a begin-to-end validation of the whole input file. More... | |
constructor (hash specs, *hash opts) | |
creates the FixedLengthAbstractWriter object More... | |
string | formatLine (hash line) |
Formats a single line from a hash describing the record type and its contents. More... | |
int | linesCount () |
get processed lines count | |
Private Member Methods | |
File | m_file () |
file object | |
Private Attributes | |
string | file |
file name | |
Writer for fixed-length line output files.
Instantiates the FixedLengthFileWriter object.
file_name | the output file path |
specs | Fixed-length line specification; see Specification Hash for more information |
opts | Global options; see Global Options for valid values |
FixedLengthUtil::FixedLengthFileWriter::write | ( | hash | line | ) |
Renders a single line for a single input record hash to the output file.
line | A hash representing input data to be writen to the file; the hash must have the following keys:
|
INVALID-RECORD | record name (type key in the record hash) not recognized |
FIELD-INPUT-ERROR | the input value is too large to render into the output field |
RECORD-TRANSITION-ERROR | a record transition error occurred; an invalid record sequence was given in the input data |
FixedLengthUtil::FixedLengthFileWriter::write | ( | list | lines | ) |
iterates the input records and writes rendered versions of all input records to the file
lines | A list of input records; each list value must be a hash with the following keys:
|
INVALID-RECORD | record name (type key in the record hash) not recognized |
FIELD-INPUT-ERROR | the input value is too large to render into the output field |
RECORD-TRANSITION-ERROR | a record transition error occurred; an invalid record sequence was given in the input data |
FixedLengthUtil::FixedLengthFileWriter::write | ( | Qore::AbstractIterator | lines | ) |
iterates the input records and writes rendered versions of all input records to the file
lines | An iterator to stream input records; each iterator value must be a hash with the following keys:
|
INVALID-RECORD | record name (type key in the record hash) not recognized |
FIELD-INPUT-ERROR | the input value is too large to render into the output field |
RECORD-TRANSITION-ERROR | a record transition error occurred; an invalid record sequence was given in the input data |