mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-15 10:52:30 +00:00
97f2a2213e
* Move some code outside dbms/src folder * Fix paths
28 lines
538 B
C++
28 lines
538 B
C++
#pragma once
|
|
|
|
#include <Core/Names.h>
|
|
#include <Parsers/IAST_fwd.h>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
class ASTQueryParameter;
|
|
|
|
/// Visit substitutions in a query, replace ASTQueryParameter with ASTLiteral.
|
|
class ReplaceQueryParameterVisitor
|
|
{
|
|
public:
|
|
ReplaceQueryParameterVisitor(const NameToNameMap & parameters)
|
|
: query_parameters(parameters)
|
|
{}
|
|
|
|
void visit(ASTPtr & ast);
|
|
|
|
private:
|
|
const NameToNameMap & query_parameters;
|
|
const String & getParamValue(const String & name);
|
|
void visitQueryParameter(ASTPtr & ast);
|
|
};
|
|
|
|
}
|