| 1 | //===----------------------------------------------------------------------===// |
|---|---|
| 2 | // DuckDB |
| 3 | // |
| 4 | // duckdb/main/relation/read_csv_relation.hpp |
| 5 | // |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | #pragma once |
| 10 | |
| 11 | #include "duckdb/execution/operator/persistent/csv_reader_options.hpp" |
| 12 | #include "duckdb/main/relation/table_function_relation.hpp" |
| 13 | |
| 14 | namespace duckdb { |
| 15 | |
| 16 | struct BufferedCSVReaderOptions; |
| 17 | |
| 18 | class ReadCSVRelation : public TableFunctionRelation { |
| 19 | public: |
| 20 | ReadCSVRelation(const std::shared_ptr<ClientContext> &context, const string &csv_file, |
| 21 | vector<ColumnDefinition> columns, string alias = string()); |
| 22 | ReadCSVRelation(const std::shared_ptr<ClientContext> &context, const string &csv_file, |
| 23 | BufferedCSVReaderOptions options, string alias = string()); |
| 24 | |
| 25 | string alias; |
| 26 | bool auto_detect; |
| 27 | |
| 28 | public: |
| 29 | string GetAlias() override; |
| 30 | }; |
| 31 | |
| 32 | } // namespace duckdb |
| 33 |