OmniSciDB
bf83d84833
|
#include <QueryExporterCSV.h>
Public Member Functions | |
QueryExporterCSV () | |
~QueryExporterCSV () | |
void | beginExport (const std::string &file_path, const std::string &layer_name, const CopyParams ©_params, const std::vector< TargetMetaInfo > &column_infos, const FileCompression file_compression, const ArrayNullHandling array_null_handling) final |
void | exportResults (const std::vector< AggregatedResult > &query_results) final |
void | endExport () final |
![]() | |
QueryExporter (const FileType file_type) | |
QueryExporter ()=delete | |
virtual | ~QueryExporter () |
Private Attributes | |
std::ofstream | outfile_ |
CopyParams | copy_params_ |
Additional Inherited Members | |
![]() | |
enum | FileType { FileType::kCSV, FileType::kGeoJSON, FileType::kGeoJSONL, FileType::kShapefile } |
enum | FileCompression { FileCompression::kNone, FileCompression::kGZip, FileCompression::kZip } |
enum | ArrayNullHandling { ArrayNullHandling::kAbortWithWarning, ArrayNullHandling::kExportSentinels, ArrayNullHandling::kExportZeros, ArrayNullHandling::kNullEntireField } |
![]() | |
static std::unique_ptr < QueryExporter > | create (const FileType file_type) |
![]() | |
void | validateFileExtensions (const std::string &file_path, const std::string &file_type, const std::unordered_set< std::string > &valid_extensions) const |
std::string | safeColumnName (const std::string &resname, const int column_index) |
![]() | |
const FileType | file_type_ |
Definition at line 25 of file QueryExporterCSV.h.
import_export::QueryExporterCSV::QueryExporterCSV | ( | ) |
Definition at line 27 of file QueryExporterCSV.cpp.
import_export::QueryExporterCSV::~QueryExporterCSV | ( | ) |
Definition at line 29 of file QueryExporterCSV.cpp.
|
finalvirtual |
Implements import_export::QueryExporter.
Definition at line 31 of file QueryExporterCSV.cpp.
References copy_params_, import_export::CopyParams::delimiter, import_export::HAS_HEADER, import_export::CopyParams::has_header, import_export::QueryExporter::kNone, import_export::CopyParams::line_delim, outfile_, import_export::QueryExporter::safeColumnName(), and import_export::QueryExporter::validateFileExtensions().
|
finalvirtual |
Implements import_export::QueryExporter.
Definition at line 201 of file QueryExporterCSV.cpp.
References outfile_.
|
finalvirtual |
Implements import_export::QueryExporter.
Definition at line 75 of file QueryExporterCSV.cpp.
References CHECK, CHECK_EQ, copy_params_, datum_to_string(), import_export::CopyParams::delimiter, import_export::CopyParams::escape, shared::formatHMS(), is_null(), kBIGINT, kBOOLEAN, kDATE, kFLOAT, kINT, kNUMERIC, kSMALLINT, kTIME, kTIMESTAMP, kTINYINT, import_export::CopyParams::line_delim, NULL_BIGINT, NULL_BOOLEAN, NULL_DOUBLE, NULL_FLOAT, NULL_INT, NULL_SMALLINT, import_export::CopyParams::null_str, NULL_TINYINT, outfile_, import_export::CopyParams::quote, and import_export::CopyParams::quoted.
|
private |
Definition at line 41 of file QueryExporterCSV.h.
Referenced by beginExport(), and exportResults().
|
private |
Definition at line 40 of file QueryExporterCSV.h.
Referenced by beginExport(), endExport(), and exportResults().