MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / getTableExpressionAlias

Function getTableExpressionAlias

src/Parsers/ASTSelectQuery.cpp:440–450  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

438}
439
440static String getTableExpressionAlias(const ASTTableExpression * table_expression)
441{
442 if (table_expression->subquery)
443 return table_expression->subquery->tryGetAlias();
444 if (table_expression->table_function)
445 return table_expression->table_function->tryGetAlias();
446 if (table_expression->database_and_table_name)
447 return table_expression->database_and_table_name->tryGetAlias();
448
449 return String();
450}
451
452void ASTSelectQuery::replaceDatabaseAndTable(const String & database_name, const String & table_name)
453{

Callers 2

addTableFunctionMethod · 0.85

Calls 2

StringClass · 0.50
tryGetAliasMethod · 0.45

Tested by

no test coverage detected