ClickHouse/src/Interpreters/InterpreterTransactionControlQuery.h

34 lines
906 B
C++
Raw Normal View History

2021-03-31 17:55:04 +00:00
#pragma once
#include <Interpreters/IInterpreter.h>
#include <Parsers/IAST_fwd.h>
namespace DB
{
class InterpreterTransactionControlQuery : public IInterpreter
2021-03-31 17:55:04 +00:00
{
public:
InterpreterTransactionControlQuery(const ASTPtr & query_ptr_, ContextMutablePtr context_)
: query_context(context_)
, query_ptr(query_ptr_)
2021-03-31 17:55:04 +00:00
{
}
BlockIO execute() override;
bool ignoreQuota() const override { return true; }
bool ignoreLimits() const override { return true; }
bool supportsTransactions() const override { return true; }
BlockIO executeBegin(ContextMutablePtr session_context);
2022-05-20 20:08:46 +00:00
BlockIO executeCommit(ContextMutablePtr session_context);
2021-11-08 18:56:09 +00:00
static BlockIO executeRollback(ContextMutablePtr session_context);
2022-03-18 13:33:59 +00:00
static BlockIO executeSetSnapshot(ContextMutablePtr session_context, UInt64 snapshot);
2021-03-31 17:55:04 +00:00
private:
ContextMutablePtr query_context;
2021-03-31 17:55:04 +00:00
ASTPtr query_ptr;
};
}