| 111 | } |
| 112 | |
| 113 | ASTPtr 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 | |
| 126 | UUID DatabaseMemory::tryGetTableUUID(const String & table_name) const |
| 127 | { |