1#include "duckdb/common/enums/relation_type.hpp"
2
3#include "duckdb/common/exception.hpp"
4
5using namespace std;
6
7namespace duckdb {
8
9string RelationTypeToString(RelationType type) {
10 switch (type) {
11 case RelationType::TABLE_RELATION:
12 return "TABLE_RELATION";
13 case RelationType::PROJECTION_RELATION:
14 return "PROJECTION_RELATION";
15 case RelationType::FILTER_RELATION:
16 return "FILTER_RELATION";
17 case RelationType::EXPLAIN_RELATION:
18 return "EXPLAIN_RELATION";
19 case RelationType::CROSS_PRODUCT_RELATION:
20 return "CROSS_PRODUCT_RELATION";
21 case RelationType::JOIN_RELATION:
22 return "JOIN_RELATION";
23 case RelationType::AGGREGATE_RELATION:
24 return "AGGREGATE_RELATION";
25 case RelationType::SET_OPERATION_RELATION:
26 return "SET_OPERATION_RELATION";
27 case RelationType::DISTINCT_RELATION:
28 return "DISTINCT_RELATION";
29 case RelationType::LIMIT_RELATION:
30 return "LIMIT_RELATION";
31 case RelationType::ORDER_RELATION:
32 return "ORDER_RELATION";
33 case RelationType::CREATE_VIEW_RELATION:
34 return "CREATE_VIEW_RELATION";
35 case RelationType::CREATE_TABLE_RELATION:
36 return "CREATE_TABLE_RELATION";
37 case RelationType::INSERT_RELATION:
38 return "INSERT_RELATION";
39 case RelationType::VALUE_LIST_RELATION:
40 return "VALUE_LIST_RELATION";
41 case RelationType::DELETE_RELATION:
42 return "DELETE_RELATION";
43 case RelationType::UPDATE_RELATION:
44 return "UPDATE_RELATION";
45 case RelationType::WRITE_CSV_RELATION:
46 return "WRITE_CSV_RELATION";
47 case RelationType::READ_CSV_RELATION:
48 return "READ_CSV_RELATION";
49 case RelationType::SUBQUERY_RELATION:
50 return "SUBQUERY_RELATION";
51 case RelationType::TABLE_FUNCTION_RELATION:
52 return "TABLE_FUNCTION_RELATION";
53 case RelationType::VIEW_RELATION:
54 return "VIEW_RELATION";
55 case RelationType::INVALID_RELATION:
56 default:
57 return "INVALID_RELATION";
58 }
59}
60
61} // namespace duckdb
62