1//===----------------------------------------------------------------------===//
2// DuckDB
3//
4// duckdb/parser/statement/copy_statement.hpp
5//
6//
7//===----------------------------------------------------------------------===//
8
9#pragma once
10
11#include "duckdb/parser/parsed_data/copy_info.hpp"
12#include "duckdb/parser/query_node.hpp"
13#include "duckdb/parser/sql_statement.hpp"
14
15namespace duckdb {
16
17class CopyStatement : public SQLStatement {
18public:
19 static constexpr const StatementType TYPE = StatementType::COPY_STATEMENT;
20
21public:
22 CopyStatement();
23
24 unique_ptr<CopyInfo> info;
25 // The SQL statement used instead of a table when copying data out to a file
26 unique_ptr<QueryNode> select_statement;
27 string ToString() const override;
28 string CopyOptionsToString(const string &format, const case_insensitive_map_t<vector<Value>> &options) const;
29
30protected:
31 CopyStatement(const CopyStatement &other);
32
33public:
34 DUCKDB_API unique_ptr<SQLStatement> Copy() const override;
35
36private:
37};
38} // namespace duckdb
39