291 "compat_force_empty_string": C_OPT1|C_OPT2,
292 "date_format": C_OPT1|C_OPT2,
293 "date-format": C_OPT1|C_OPT2,
294 "encoding": C_OPT1|C_OPT2,
295 "eol": C_OPT1|C_OPT2,
296 "extended_record": C_OPT2,
298 "header-lines": C_OPT1|C_OPT2,
299 "header_lines": C_OPT1|C_OPT2,
300 "header-names": C_OPT1|C_OPT2,
301 "header_names": C_OPT1|C_OPT2,
302 "header_reorder": C_OPT1|C_OPT2,
304 "ignore-empty": C_OPT1|C_OPT2,
305 "ignore_empty": C_OPT1|C_OPT2,
306 "ignore-whitespace": C_OPT1|C_OPT2,
307 "ignore_whitespace": C_OPT1|C_OPT2,
308 "number_format": C_OPT1|C_OPT2,
309 "quote": C_OPT1|C_OPT2,
310 "separator": C_OPT1|C_OPT2,
311 "timezone": C_OPT1|C_OPT2,
312 "tolwr": C_OPT1|C_OPT2,
313 "verify-columns": C_OPT1|C_OPT2,
314 "verify_columns": C_OPT1|C_OPT2,
318 string separator =
",";
324 softint headerLines = 0;
327 bool headerNames = False;
330 bool ignoreEmptyLines = True;
333 bool ignoreWhitespace = True;
339 bool checkElementCounts = False;
342 bool extendedRecord = False;
345 bool compat_force_empty_string = False;
357 hash<string, hash<string, list<hash<auto>>>> m_resolve_by_rule;
360 hash<string, list<string>> m_resolve_by_count;
363 hash<string, list<string>> m_resolve_by_idx;
366 bool fakeHeaderNames;
372 AbstractLineIterator lineIterator;
394 constructor(AbstractLineIterator li, hash<auto> spec, hash<auto> opts);
613 auto handleType(hash<auto> fh, *
string val);
the AbstractCsvIterator class is an abstract base class that allows abstract CSV data to be iterated
Definition: AbstractCsvIterator.qc.dox.h:285
prepareFieldsFromHeaders(*list< auto > headers)
match headers provided at csv header or in options, never called for multi-type because header_names ...
hash< auto > getRecord(bool extended)
Returns the current record as a hash.
string getQuote()
Returns the current quote string.
processSpec(hash< auto > spec)
process specification and assing internal data for resolving
*string eol
the eol marker, if any
Definition: AbstractCsvIterator.qc.dox.h:369
auto memberGate(string name)
Returns the given column value for the current row.
constructor(AbstractLineIterator li, *hash< auto > opts)
creates the AbstractCsvIterator with an option hash in single-type mode
string getRawLine()
Returns the current line 'as it is', i.e. the original string.
const Options
valid options for the object (a hash for quick lookups of valid keys)
Definition: AbstractCsvIterator.qc.dox.h:290
peek()
Reads a single row without moving the index position.
*hash< string, AbstractDataField > getRecordType()
Returns the description of the record type, if any.
string identifyType(list< auto > rec)
Identify a fixed-length line type using identifyTypeImpl(); may be overridden if necessary.
hash< auto > getRecord()
Returns the current record as a hash.
int index()
Returns the row index being iterated, which does not necessarily correspond to the line number when t...
hash< auto > getValue()
Returns the current record as a hash.
*string identifyTypeImpl(list< auto > rec)
Identify a input record, given the raw line string. This method performs a lookup to a precalculated ...
hash< auto > parseLine()
Parses a line in the file and returns a processed list of the fields.
*list< string > getHeaders()
Returns the current record headers or NOTHING if no headers have been detected or saved yet.
int lineNumber()
Returns the current iterator line number in the file (the first line is line 1) or 0 if not pointing ...
processCommonOptions(*hash< auto > opts, int C_OPTx)
process common options and and assing internal fields
constructor(AbstractLineIterator li, hash< auto > spec, hash< auto > opts)
creates the AbstractCsvIterator with an option hash in multi-type mode
*list< string > getHeaders(string type)
Returns a list of headers for the given record or NOTHING if the record is not recognized.
list< *string > getLineAndSplit()
Read line split by separator/quote into list.
list< *string > getRawLineValues()
Returns the list of raw string values of the current line.
auto getRecordList()
Returns the current record as a list.
string getSeparator()
Returns the current separator string.
bool next()
Moves the current line / record position to the next line / record; returns False if there are no mor...
the CsvUtil namespace. All classes used in the CsvUtil module should be inside this namespace
Definition: AbstractCsvIterator.qc.dox.h:28