1//===----------------------------------------------------------------------===//
2// DuckDB
3//
4// duckdb/main/relation/value_relation.hpp
5//
6//
7//===----------------------------------------------------------------------===//
8
9#pragma once
10
11#include "duckdb/main/relation.hpp"
12#include "duckdb/parser/parsed_expression.hpp"
13
14namespace duckdb {
15
16class ValueRelation : public Relation {
17public:
18 ValueRelation(const std::shared_ptr<ClientContext> &context, const vector<vector<Value>> &values,
19 vector<string> names, string alias = "values");
20 ValueRelation(const std::shared_ptr<ClientContext> &context, const string &values, vector<string> names,
21 string alias = "values");
22
23 vector<vector<unique_ptr<ParsedExpression>>> expressions;
24 vector<string> names;
25 vector<ColumnDefinition> columns;
26 string alias;
27
28public:
29 unique_ptr<QueryNode> GetQueryNode() override;
30
31 const vector<ColumnDefinition> &Columns() override;
32 string ToString(idx_t depth) override;
33 string GetAlias() override;
34
35 unique_ptr<TableRef> GetTableRef() override;
36};
37
38} // namespace duckdb
39