210 constructor(
string n_errname, hash<auto> spec, hash<auto> n_opts);
323 string prepareRawLineIntern(list<auto> values);
The AbstractCsvWriter class provides a parent for all CSV writers.
Definition: AbstractCsvWriter.qc.dox.h:139
string baseTemplate
base template for value format
Definition: AbstractCsvWriter.qc.dox.h:172
write(Qore::AbstractIterator iterator)
Stream an iterator into the output.
abstract writeRawLine(list< auto > values)
This method must be overridden in child classes to provide the output implementation.
writeLine(hash< auto > values)
Write a line with headers-values hash.
writeLine(string type, hash< auto > values)
Write a line for a specific record from a hash to the output.
string prepareRawLine(list< auto > values)
Prepare a string (line with EOF) with formatting and escaping.
constructor(string n_errname, hash< auto > spec, hash< auto > n_opts)
Creates the AbstractCsvWriter in single-type mode.
write(list< auto > l)
Stream the contents of the list into the output.
write(Qore::SQL::SQLStatement iterator)
Stream an iterator into the output.
int block
block size for bulk DML
Definition: AbstractCsvWriter.qc.dox.h:169
string encoding
output file character encoding
Definition: AbstractCsvWriter.qc.dox.h:148
*hash< string, AbstractDataField > getRecordType()
Returns the description of the record type, if any.
hash m_out_by_name
mapping output field by name
Definition: AbstractCsvWriter.qc.dox.h:184
string quote
field content delimiter
Definition: AbstractCsvWriter.qc.dox.h:154
string eol
end of line sequence
Definition: AbstractCsvWriter.qc.dox.h:160
writeHeaders()
Write csv headers.
bool write_headers
this flag determines if any stored headers are output
Definition: AbstractCsvWriter.qc.dox.h:175
*code info_log
a closure/call reference for informational logging when using write(SQLStatement)
Definition: AbstractCsvWriter.qc.dox.h:181
bool optimal_quotes
stores the optimal quotes option
Definition: AbstractCsvWriter.qc.dox.h:178
string m_quoteEscapeChar
quote escape character
Definition: AbstractCsvWriter.qc.dox.h:157
const Options
valid options for the object (a hash for quick lookups of valid keys)
Definition: AbstractCsvWriter.qc.dox.h:144
bool checkElementCounts
verify the column count for every row; if a row does not match, then throw a CSVFILEITERATOR-DATA-ERR...
Definition: AbstractCsvWriter.qc.dox.h:163
string separator
field separator
Definition: AbstractCsvWriter.qc.dox.h:151
int lineNo
the latest line number
Definition: AbstractCsvWriter.qc.dox.h:166
constructor(string n_errname, *hash< auto > n_opts)
Creates the AbstractCsvWriter in single-type mode.
hash m_out_by_idx
mapping output field by index
Definition: AbstractCsvWriter.qc.dox.h:187
writeLine(string type, list< auto > values)
Write a line with headers-values list.
writeLine(list< auto > values)
Write a line with a list of values; data are checked against column rules.
processCommonOptions(*hash< auto > n_opts, int C_OPTx)
Process options and set internal variables.
processSpec()
Process specification and set internal variable for mapping.
hash< auto > hash(object obj)
the CsvUtil namespace. All classes used in the CsvUtil module should be inside this namespace
Definition: AbstractCsvIterator.qc.dox.h:28
const EOL_UNIX
Unix end of line character sequence (for new OS X too)
Definition: CsvUtil.qm.dox.h:333