1 | #include "duckdb/common/enums/statement_type.hpp" |
---|---|
2 | |
3 | using namespace std; |
4 | |
5 | namespace duckdb { |
6 | |
7 | string StatementTypeToString(StatementType type) { |
8 | switch (type) { |
9 | case StatementType::SELECT_STATEMENT: |
10 | return "SELECT"; |
11 | case StatementType::INSERT_STATEMENT: |
12 | return "INSERT"; |
13 | case StatementType::UPDATE_STATEMENT: |
14 | return "UPDATE"; |
15 | case StatementType::DELETE_STATEMENT: |
16 | return "DELETE"; |
17 | case StatementType::PREPARE_STATEMENT: |
18 | return "PREPARE"; |
19 | case StatementType::EXECUTE_STATEMENT: |
20 | return "EXECUTE"; |
21 | case StatementType::ALTER_STATEMENT: |
22 | return "ALTER"; |
23 | case StatementType::TRANSACTION_STATEMENT: |
24 | return "TRANSACTION"; |
25 | case StatementType::COPY_STATEMENT: |
26 | return "COPY"; |
27 | case StatementType::ANALYZE_STATEMENT: |
28 | return "ANALYZE"; |
29 | case StatementType::VARIABLE_SET_STATEMENT: |
30 | return "VARIABLE_SET"; |
31 | case StatementType::CREATE_FUNC_STATEMENT: |
32 | return "CREATE_FUNC"; |
33 | case StatementType::EXPLAIN_STATEMENT: |
34 | return "EXPLAIN"; |
35 | case StatementType::CREATE_STATEMENT: |
36 | return "CREATE"; |
37 | case StatementType::DROP_STATEMENT: |
38 | return "DROP"; |
39 | case StatementType::PRAGMA_STATEMENT: |
40 | return "PRAGMA"; |
41 | case StatementType::VACUUM_STATEMENT: |
42 | return "VACUUM"; |
43 | case StatementType::RELATION_STATEMENT: |
44 | return "RELATION"; |
45 | default: |
46 | return "INVALID"; |
47 | } |
48 | } |
49 | |
50 | } // namespace duckdb |
51 |