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

Method getDatabaseAndTable

src/Interpreters/DatabaseCatalog.cpp:1193–1202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1191}
1192
1193DatabaseAndTable DatabaseCatalog::getDatabaseAndTable(const StorageID & table_id, ContextPtr local_context) const
1194{
1195 std::optional<Exception> exc;
1196 auto res = local_context->hasQueryContext() ?
1197 local_context->getQueryContext()->getOrCacheStorage(table_id, [&](){ return getTableImpl(table_id, local_context, &exc); }) :
1198 getTableImpl(table_id, local_context, &exc);
1199 if (!res.second)
1200 throw Exception(*exc);
1201 return res;
1202}
1203
1204DatabaseAndTable DatabaseCatalog::tryGetDatabaseAndTable(const StorageID & table_id, ContextPtr local_context) const
1205{

Callers 1

executeToTableImplMethod · 0.80

Calls 4

hasQueryContextMethod · 0.80
getOrCacheStorageMethod · 0.80
ExceptionClass · 0.70
getQueryContextMethod · 0.45

Tested by

no test coverage detected