mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-19 06:01:57 +00:00
28 lines
514 B
C++
28 lines
514 B
C++
|
#pragma once
|
||
|
|
||
|
#include <Core/Names.h>
|
||
|
#include <Parsers/IAST_fwd.h>
|
||
|
|
||
|
namespace DB
|
||
|
{
|
||
|
|
||
|
class ASTQueryParameter;
|
||
|
|
||
|
/// Get prepared statements in query, replace ASTQueryParameter with ASTLiteral.
|
||
|
class ReplaceQueryParameterVisitor
|
||
|
{
|
||
|
public:
|
||
|
ReplaceQueryParameterVisitor(const NameToNameMap & params)
|
||
|
: params_substitution(params)
|
||
|
{}
|
||
|
|
||
|
void visit(ASTPtr & ast);
|
||
|
|
||
|
private:
|
||
|
const NameToNameMap params_substitution;
|
||
|
void visitQP(ASTPtr & ast);
|
||
|
String getParamValue(const String & name);
|
||
|
};
|
||
|
|
||
|
}
|