Qore CsvUtil Module Reference
1.5
|
The CsvFileWriter class for safe CSV file creation. More...
Public Member Functions | |
constructor (string path, *hash opts) | |
creates the CsvFileWriter in single-type mode with the path of the file to read and an optional option hash More... | |
constructor (string path, hash spec, hash opts) | |
creates the CsvFileWriter in multi-type mode with the path of the file to read with an option hash More... | |
private | writeRawLine (list values) |
This method must be overridden in child classes to provide the output implementation. | |
![]() | |
constructor (string n_errname, *hash n_opts) | |
Creates the AbstractCsvWriter in single-type mode. More... | |
constructor (string n_errname, hash spec, hash n_opts) | |
Creates the AbstractCsvWriter in single-type mode. More... | |
private string | prepareRawLine (list values) |
Prepare a string (line with EOF) with formatting and escaping. More... | |
private | processCommonOptions (*hash n_opts, int C_OPTx) |
Process options and set internal variables. | |
private | processSpec () |
Process specification and set internal variable for mapping. | |
write (Qore::AbstractIterator iterator) | |
Stream an iterator into the output. More... | |
write (Qore::SQL::SQLStatement iterator) | |
Stream an iterator into the output. More... | |
write (list l) | |
Stream the contents of the list into the output. More... | |
private | writeHeaders () |
Write csv headers. | |
writeLine (list values) | |
Write a line with a list of values; data are checked against column rules. More... | |
writeLine (hash values) | |
Write a line with headers-values hash. More... | |
writeLine (string type, list values) | |
Write a line with headers-values list. More... | |
writeLine (string type, hash values) | |
Write a line for a specific record from a hash to the output. More... | |
The CsvFileWriter class for safe CSV file creation.
creates the CsvFileWriter in single-type mode with the path of the file to read and an optional option hash
path | a file name (with path optionally) to write |
opts | AbstractCsvWriter Constructor Option Hash Overview |
The file is created with O_CREAT, O_TRUNC, O_WRONLY and 0644 access.
CSVFILEITER-ERROR | in the case of incorrect options |
creates the CsvFileWriter in multi-type mode with the path of the file to read with an option hash
path | a file name (with path optionally) to write |
spec | a hash of field and type definition; see Option Field Hash for more information |
opts | AbstractCsvWriter Constructor Option Hash Overview |
The file is created with O_CREAT, O_TRUNC, O_WRONLY and 0644 access.
CSVFILEITER-ERROR | in the case of incorrect options |