libdballe
6.8
|
CSVWriter implementation that writes its output file atomically. More...
#include <serializer.h>
Public Member Functions | |
CSVOutfile (const std::string &pathname) | |
void | open (const std::string &pathname) |
void | commit () |
Commit the write, closing the output temporary file and renaming it to its final name. | |
void | rollback () |
Roll back the write, deleting the output temporary file and leaving the original untouched. | |
virtual void | flush_row () |
Write the current line to the output file, and start a new one. | |
![]() | |
void | add_value_raw (const char *str) |
Add a value to the current row, without any escaping. | |
void | add_value_raw (const std::string &str) |
Add a value to the current row, without any escaping. | |
void | add_value (int val) |
Add an int value to the current row. | |
void | add_value_withmissing (int val) |
Add an int value that can potentially be missing. | |
void | add_value (unsigned val) |
Add an int value to the current row. | |
void | add_value (uint64_t val) |
Add an int value to the current row. | |
void | add_value (wreport::Varcode val) |
Add an int value to the current row. | |
void | add_var_value (const wreport::Var &val) |
Add a variable value. | |
void | add_value (const char *val) |
Add a string to the current row. | |
void | add_value (const std::string &val) |
Add a string to the current row. | |
Data Fields | |
std::string | pathname |
std::string | pathname_tmp |
FILE * | fd |
Additional Inherited Members | |
![]() | |
std::string | row |
CSVWriter implementation that writes its output file atomically.