forked from hyrise/sql-parser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathImportExportOptions.h
More file actions
42 lines (33 loc) · 896 Bytes
/
ImportExportOptions.h
File metadata and controls
42 lines (33 loc) · 896 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef SQLPARSER_IMPORT_EXPORT_OPTIONS_H
#define SQLPARSER_IMPORT_EXPORT_OPTIONS_H
namespace hsql {
// Name unchanged for compatibility. Historically, this was only used for import statements before we introduced export
// statements (`COPY ... TO`). We did not change the enum name to accomodate forks. In the grammar, however, we call the
// corresponding terminal symbol `file_type` and use it for both `ImportStatement` and `ExportStatement`.
enum ImportType {
kImportCSV,
kImportTbl, // Hyrise file format.
kImportBinary,
kImportAuto
};
enum CsvOptionType {
Delimiter,
Null,
Quote,
};
struct CsvOptions {
CsvOptions();
~CsvOptions();
char* delimiter;
char* null;
char* quote;
};
struct ImportExportOptions {
ImportExportOptions();
~ImportExportOptions();
ImportType format;
char* encoding;
CsvOptions* csv_options;
};
} // namespace hsql
#endif