Kùzu C++ API
Loading...
Searching...
No Matches
reader_config.h
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4#include <vector>
5
6#include "copy_constructors.h"
7#include "value.h"
8
9namespace kuzu {
10namespace common {
11
12enum class FileType : uint8_t {
13 UNKNOWN = 0,
14 CSV = 1,
15 PARQUET = 2,
16 NPY = 3,
17 TURTLE = 4, // Terse triples http://www.w3.org/TR/turtle
18 NQUADS = 5, // Line-based quads http://www.w3.org/TR/n-quads/
19 NTRIPLES = 6, // Line-based triples http://www.w3.org/TR/n-triples/
20};
21
24 std::string fileTypeStr;
25};
26
28 static FileType getFileTypeFromExtension(std::string_view extension);
29 static std::string toString(FileType fileType);
30 static FileType fromString(std::string fileType);
31};
32
35 std::vector<std::string> filePaths;
36 std::unordered_map<std::string, Value> options;
37
40 : fileTypeInfo{std::move(fileTypeInfo)}, filePaths{std::move(filePaths)} {}
42
43 uint32_t getNumFiles() const { return filePaths.size(); }
44
45private:
46 ReaderConfig(const ReaderConfig& other)
48};
49
50} // namespace common
51} // namespace kuzu
FileType
Definition reader_config.h:12
Definition alter_type.h:5
Definition reader_config.h:22
std::string fileTypeStr
Definition reader_config.h:24
FileType fileType
Definition reader_config.h:23
Definition reader_config.h:27
static FileType getFileTypeFromExtension(std::string_view extension)
static FileType fromString(std::string fileType)
static std::string toString(FileType fileType)
Definition reader_config.h:33
ReaderConfig(FileTypeInfo fileTypeInfo, std::vector< std::string > filePaths)
Definition reader_config.h:39
uint32_t getNumFiles() const
Definition reader_config.h:43
std::vector< std::string > filePaths
Definition reader_config.h:35
EXPLICIT_COPY_DEFAULT_MOVE(ReaderConfig)
std::unordered_map< std::string, Value > options
Definition reader_config.h:36
FileTypeInfo fileTypeInfo
Definition reader_config.h:34
ReaderConfig()
Definition reader_config.h:38