mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-13 09:52:38 +00:00
202f52dc3a
Modeled after (*) Fixes #46437 (*) https://dev.mysql.com/doc/refman/8.0/en/show-columns.html
41 lines
790 B
C++
41 lines
790 B
C++
#pragma once
|
|
|
|
#include <Parsers/IAST_fwd.h>
|
|
#include <base/types.h>
|
|
|
|
#include <optional>
|
|
#include <vector>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
class ASTIdentifier;
|
|
class ASTTableIdentifier;
|
|
|
|
/// ASTIdentifier Helpers: hide casts and semantic.
|
|
|
|
void setIdentifierSpecial(ASTPtr & ast);
|
|
|
|
String getIdentifierName(const IAST * ast);
|
|
|
|
std::optional<String> tryGetIdentifierName(const IAST * ast);
|
|
|
|
bool tryGetIdentifierNameInto(const IAST * ast, String & name);
|
|
|
|
inline String getIdentifierName(const ASTPtr & ast)
|
|
{
|
|
return getIdentifierName(ast.get());
|
|
}
|
|
|
|
inline std::optional<String> tryGetIdentifierName(const ASTPtr & ast)
|
|
{
|
|
return tryGetIdentifierName(ast.get());
|
|
}
|
|
|
|
inline bool tryGetIdentifierNameInto(const ASTPtr & ast, String & name)
|
|
{
|
|
return tryGetIdentifierNameInto(ast.get(), name);
|
|
}
|
|
|
|
}
|