294 string separator =
",";
300 softint headerLines = 0;
303 bool headerNames =
False;
306 bool ignoreEmptyLines =
True;
309 bool ignoreWhitespace =
True;
315 bool checkElementCounts =
False;
318 bool extendedRecord =
False;
321 bool compat_force_empty_string =
False;
333 hash<string, hash<string, list<hash<auto>>>> m_resolve_by_rule;
336 hash<string, list<string>> m_resolve_by_count;
339 hash<string, list<string>> m_resolve_by_idx;
342 bool fakeHeaderNames;
348 AbstractLineIterator lineIterator;
360 constructor(AbstractLineIterator li, *hash<auto> opts);
370 constructor(AbstractLineIterator li, hash<auto> spec, hash<auto> opts);
589 auto handleType(hash<auto> fh, *
string val);
int index()
Returns the row index being iterated, which does not necessarily correspond to the line number when t...
the AbstractCsvIterator class is an abstract base class that allows abstract CSV data to be iterated ...
Definition: AbstractCsvIterator.qc.dox.h:285
processSpec(hash< auto > spec)
process specification and assing internal data for resolving
prepareFieldsFromHeaders(*list< auto > headers)
match headers provided at csv header or in options, never called for multi-type because header_names ...
const Options
valid options for the object (a hash for quick lookups of valid keys)
Definition: AbstractCsvIterator.qc.dox.h:290
string getQuote()
Returns the current quote string.
*string identifyTypeImpl(list< auto > rec)
Identify a input record, given the raw line string. This method performs a lookup to a precalculated ...
*list< string > getHeaders()
Returns the current record headers or NOTHING if no headers have been detected or saved yet...
processCommonOptions(*hash< auto > opts, int C_OPTx)
process common options and and assing internal fields
list< *string > getRawLineValues()
Returns the list of raw string values of the current line.
hash< auto > getRecord()
Returns the current record as a hash.
string getSeparator()
Returns the current separator string.
string identifyType(list< auto > rec)
Identify a fixed-length line type using identifyTypeImpl(); may be overridden if necessary.
constructor(AbstractLineIterator li, *hash< auto > opts)
creates the AbstractCsvIterator with an option hash in single-type mode
hash< auto > getValue()
Returns the current record as a hash.
string getRawLine()
Returns the current line 'as it is', i.e. the original string.
*hash< string, AbstractDataField > getRecordType()
Returns the description of the record type, if any.
*string eol
the eol marker, if any
Definition: AbstractCsvIterator.qc.dox.h:345
peek()
Reads a single row without moving the index position.
hash< auto > parseLine()
Parses a line in the file and returns a processed list of the fields.
auto memberGate(string name)
Returns the given column value for the current row.
the CsvUtil namespace. All classes used in the CsvUtil module should be inside this namespace ...
Definition: AbstractCsvIterator.qc.dox.h:28
list< *string > getLineAndSplit()
Read line split by separator/quote into list.
auto getRecordList()
Returns the current record as a list.
bool next()
Moves the current line / record position to the next line / record; returns False if there are no mor...
int lineNumber()
Returns the current iterator line number in the file (the first line is line 1) or 0 if not pointing ...