Class import_export::QueryExporter

class QueryExporter

Subclassed by import_export::QueryExporterCSV, import_export::QueryExporterGDAL

Public Types

enum FileType

Values:

kCSV
kGeoJSON
kGeoJSONL
kShapefile
kFlatGeobuf
enum FileCompression

Values:

kNone
kGZip
kZip
enum ArrayNullHandling

Values:

kAbortWithWarning
kExportSentinels
kExportZeros
kNullEntireField

Public Functions

QueryExporter(const FileType file_type)
QueryExporter()
virtual ~QueryExporter()
virtual void beginExport(const std::string &file_path, const std::string &layer_name, const CopyParams &copy_params, const std::vector<TargetMetaInfo> &column_info, const FileCompression file_compression, const ArrayNullHandling array_null_handling) = 0
virtual void exportResults(const std::vector<AggregatedResult> &query_results) = 0
virtual void endExport() = 0

Public Static Functions

std::unique_ptr<QueryExporter> create(const FileType file_type)

Protected Functions

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)

Protected Attributes

const FileType file_type_