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>>;
|
2022-01-19 22:13:16 +00:00
|
|
|
struct BackupSettings;
|
2021-08-18 22:19:14 +00:00
|
|
|
class Context;
|
|
|
|
using ContextPtr = std::shared_ptr<const Context>;
|
|
|
|
|
|
|
|
/// Prepares backup entries.
|
2022-01-19 22:13:16 +00:00
|
|
|
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);
|
|
|
|
|
|
|
|
}
|