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

Method getCreateTableQueryImpl

src/Databases/DatabaseMemory.cpp:113–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113ASTPtr DatabaseMemory::getCreateTableQueryImpl(const String & table_name, ContextPtr, bool throw_on_error) const
114{
115 std::lock_guard lock{mutex};
116 auto it = create_queries.find(table_name);
117 if (it == create_queries.end() || !it->second)
118 {
119 if (throw_on_error)
120 throw Exception(ErrorCodes::UNKNOWN_TABLE, "There is no metadata of table {} in database {}", table_name, database_name);
121 return {};
122 }
123 return it->second->clone();
124}
125
126UUID DatabaseMemory::tryGetTableUUID(const String & table_name) const
127{

Callers

nothing calls this directly

Calls 4

ExceptionClass · 0.50
findMethod · 0.45
endMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected