mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-12 17:32:32 +00:00
24 lines
875 B
C++
24 lines
875 B
C++
#pragma once
|
|
|
|
#include <Parsers/ASTBackupQuery.h>
|
|
#include <Interpreters/Context_fwd.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
class IBackup;
|
|
class AccessRightsElements;
|
|
class DDLRenamingMap;
|
|
|
|
/// Initializes a DDLRenamingMap from a BACKUP or RESTORE query.
|
|
DDLRenamingMap makeRenamingMapFromBackupQuery(const ASTBackupQuery::Elements & elements);
|
|
|
|
/// Returns access required to execute BACKUP query.
|
|
AccessRightsElements getRequiredAccessToBackup(const ASTBackupQuery::Elements & elements);
|
|
|
|
/// Checks the definition of a restored table - it must correspond to the definition from the backup.
|
|
bool compareRestoredTableDef(const IAST & restored_table_create_query, const IAST & create_query_from_backup, const ContextPtr & global_context);
|
|
bool compareRestoredDatabaseDef(const IAST & restored_database_create_query, const IAST & create_query_from_backup, const ContextPtr & global_context);
|
|
|
|
}
|