1#pragma once
2
3#include <Interpreters/IInterpreter.h>
4#include <Parsers/IAST_fwd.h>
5
6
7namespace DB
8{
9class ASTCreateQuotaQuery;
10struct Quota;
11
12
13class InterpreterCreateQuotaQuery : public IInterpreter
14{
15public:
16 InterpreterCreateQuotaQuery(const ASTPtr & query_ptr_, Context & context_) : query_ptr(query_ptr_), context(context_) {}
17
18 BlockIO execute() override;
19
20 bool ignoreQuota() const override { return true; }
21 bool ignoreLimits() const override { return true; }
22
23private:
24 void updateQuotaFromQuery(Quota & quota, const ASTCreateQuotaQuery & query);
25
26 ASTPtr query_ptr;
27 Context & context;
28};
29}
30