ClickHouse/src/Backups/BackupUtils.h

25 lines
743 B
C++
Raw Normal View History

2021-08-18 22:19:14 +00:00
#pragma once
#include <Parsers/ASTBackupQuery.h>
namespace DB
{
class IBackup;
2022-04-19 18:15:27 +00:00
using BackupPtr = std::shared_ptr<const IBackup>;
2021-08-18 22:19:14 +00:00
using BackupMutablePtr = std::shared_ptr<IBackup>;
class IBackupEntry;
using BackupEntryPtr = std::unique_ptr<IBackupEntry>;
using BackupEntries = std::vector<std::pair<String, BackupEntryPtr>>;
struct BackupSettings;
2021-08-18 22:19:14 +00:00
class Context;
using ContextPtr = std::shared_ptr<const Context>;
/// Prepares backup entries.
BackupEntries makeBackupEntries(const ContextPtr & context, const ASTBackupQuery::Elements & elements, const BackupSettings & backup_settings);
2021-08-18 22:19:14 +00:00
/// Write backup entries to an opened backup.
void writeBackupEntries(BackupMutablePtr backup, BackupEntries && backup_entries, size_t num_threads);
}