279 "compat_force_empty_string": C_OPT1|C_OPT2,
280 "date_format": C_OPT1|C_OPT2,
281 "date-format": C_OPT1|C_OPT2,
282 "encoding": C_OPT1|C_OPT2,
283 "eol": C_OPT1|C_OPT2,
284 "extended_record": C_OPT2,
286 "header-lines": C_OPT1|C_OPT2,
287 "header_lines": C_OPT1|C_OPT2,
288 "header-names": C_OPT1|C_OPT2,
289 "header_names": C_OPT1|C_OPT2,
290 "header_reorder": C_OPT1|C_OPT2,
292 "ignore-empty": C_OPT1|C_OPT2,
293 "ignore_empty": C_OPT1|C_OPT2,
294 "ignore-whitespace": C_OPT1|C_OPT2,
295 "ignore_whitespace": C_OPT1|C_OPT2,
296 "number_format": C_OPT1|C_OPT2,
297 "quote": C_OPT1|C_OPT2,
298 "separator": C_OPT1|C_OPT2,
299 "timezone": C_OPT1|C_OPT2,
300 "tolwr": C_OPT1|C_OPT2,
301 "verify-columns": C_OPT1|C_OPT2,
302 "verify_columns": C_OPT1|C_OPT2,
306 string separator =
",";
312 softint headerLines = 0;
315 bool headerNames =
False;
318 bool ignoreEmptyLines =
True;
321 bool ignoreWhitespace =
True;
327 bool checkElementCounts =
False;
330 bool extendedRecord =
False;
333 bool compat_force_empty_string =
False;
345 hash m_resolve_by_rule;
348 hash m_resolve_by_count;
351 hash m_resolve_by_idx;
354 bool fakeHeaderNames;
357 AbstractLineIterator lineIterator;
597 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:273
const Options
valid options for the object (a hash for quick lookups of valid keys)
Definition: AbstractCsvIterator.qc.dox.h:278
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.
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.
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.
hash< auto > hash(object obj)
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
processCommonOptions(*hash opts, int C_OPTx)
process common options and and assing internal fields
list< *string > getLineAndSplit()
Read line split by separator/quote into list.
auto getRecordList()
Returns the current record as a list.
prepareFieldsFromHeaders(*list headers)
match headers provided at csv header or in options, never called for multi-type because header_names ...
processSpec(hash spec)
process specification and assing internal data for resolving
constructor(AbstractLineIterator li, *hash opts)
creates the AbstractCsvIterator with an option hash in single-type mode
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 ...