OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
QueryExporterCSV.h
Go to the documentation of this file.
1 /*
2  * Copyright 2022 HEAVY.AI, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #pragma once
18 
19 #include <fstream>
20 
22 
23 namespace import_export {
24 
26  public:
28  ~QueryExporterCSV() override;
29 
30  void beginExport(const std::string& file_path,
31  const std::string& layer_name,
32  const CopyParams& copy_params,
33  const std::vector<TargetMetaInfo>& column_infos,
34  const FileCompression file_compression,
35  const ArrayNullHandling array_null_handling) final;
36  void exportResults(const std::vector<AggregatedResult>& query_results) final;
37  void endExport() final;
38 
39  private:
40  std::ofstream outfile_;
42 };
43 
44 } // namespace import_export
void exportResults(const std::vector< AggregatedResult > &query_results) final
void beginExport(const std::string &file_path, const std::string &layer_name, const CopyParams &copy_params, const std::vector< TargetMetaInfo > &column_infos, const FileCompression file_compression, const ArrayNullHandling array_null_handling) final