mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-11 17:02:25 +00:00
aee034a597
- Move some code into module part to avoid dependency from IStorage in SystemLog - Remove extra headers from SystemLog.h - Rewrite some code that was relying on headers that was included by SystemLog.h v2: rebase v3: squash move into module part with explicit template instantiation (to make each commit self compilable after rebase)
25 lines
870 B
C++
25 lines
870 B
C++
#include <Interpreters/IInterpreter.h>
|
|
#include <Interpreters/QueryLog.h>
|
|
#include <Interpreters/Context.h>
|
|
|
|
namespace DB
|
|
{
|
|
void IInterpreter::extendQueryLogElem(
|
|
QueryLogElement & elem, const ASTPtr & ast, ContextPtr context, const String & query_database, const String & query_table) const
|
|
{
|
|
if (!query_database.empty() && query_table.empty())
|
|
{
|
|
elem.query_databases.insert(backQuoteIfNeed(query_database));
|
|
}
|
|
else if (!query_table.empty())
|
|
{
|
|
auto quoted_database = query_database.empty() ? backQuoteIfNeed(context->getCurrentDatabase())
|
|
: backQuoteIfNeed(query_database);
|
|
elem.query_databases.insert(quoted_database);
|
|
elem.query_tables.insert(quoted_database + "." + backQuoteIfNeed(query_table));
|
|
}
|
|
|
|
extendQueryLogElemImpl(elem, ast, context);
|
|
}
|
|
}
|