returns CREATE TABLE query, but with removed UUID That way it can be used to compare with the SystemLog::getCreateTableQuery()
| 294 | /// returns CREATE TABLE query, but with removed UUID |
| 295 | /// That way it can be used to compare with the SystemLog::getCreateTableQuery() |
| 296 | ASTPtr getCreateTableQueryClean(const StorageID & table_id, ContextPtr context) |
| 297 | { |
| 298 | DatabasePtr database = DatabaseCatalog::instance().getDatabase(table_id.database_name); |
| 299 | ASTPtr old_ast = database->getCreateTableQuery(table_id.table_name, context); |
| 300 | auto & old_create_query_ast = old_ast->as<ASTCreateQuery &>(); |
| 301 | /// Reset UUID |
| 302 | old_create_query_ast.uuid = UUIDHelpers::Nil; |
| 303 | return old_ast; |
| 304 | } |
| 305 | |
| 306 | } |
| 307 |
no test coverage detected