blob: 5ef940bdd3f42a3b23e3a8c370353ad18975d5f0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#pragma once
#include <Interpreters/IInterpreter.h>
#include <Parsers/IAST_fwd.h>
namespace DB
{
/** Check that table exists. Return single row with single column "result" of type UInt8 and value 0 or 1.
*/
class InterpreterExistsQuery : public IInterpreter, WithContext
{
public:
InterpreterExistsQuery(const ASTPtr & query_ptr_, ContextPtr context_) : WithContext(context_), query_ptr(query_ptr_) { }
BlockIO execute() override;
static Block getSampleBlock();
private:
ASTPtr query_ptr;
QueryPipeline executeImpl();
};
}
|