1 | //===----------------------------------------------------------------------===// |
2 | // DuckDB |
3 | // |
4 | // duckdb/parser/parsed_data/transaction_info.hpp |
5 | // |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | |
9 | #pragma once |
10 | |
11 | #include "duckdb/parser/parsed_data/parse_info.hpp" |
12 | |
13 | namespace duckdb { |
14 | |
15 | enum class TransactionType : uint8_t { INVALID, BEGIN_TRANSACTION, COMMIT, ROLLBACK }; |
16 | |
17 | struct TransactionInfo : public ParseInfo { |
18 | explicit TransactionInfo(TransactionType type); |
19 | |
20 | //! The type of transaction statement |
21 | TransactionType type; |
22 | |
23 | public: |
24 | void Serialize(Serializer &serializer) const; |
25 | static unique_ptr<ParseInfo> Deserialize(Deserializer &deserializer); |
26 | }; |
27 | |
28 | } // namespace duckdb |
29 | |