Commit missed files

This commit is contained in:
alesapin 2022-08-20 17:21:03 +02:00
parent d8664c3227
commit 8fd3088459
2 changed files with 38 additions and 0 deletions

27
src/Backups/BackupIO.cpp Normal file
View File

@ -0,0 +1,27 @@
#include <Backups/BackupIO.h>
#include <IO/copyData.h>
#include <IO/WriteBuffer.h>
#include <IO/SeekableReadBuffer.h>
namespace DB
{
namespace ErrorCodes
{
extern const int NOT_IMPLEMENTED;
}
void IBackupWriter::copyFileThroughBuffer(std::unique_ptr<SeekableReadBuffer> && source, const String & file_name)
{
auto write_buffer = writeFile(file_name);
copyData(*source, *write_buffer);
write_buffer->finalize();
}
void IBackupWriter::copyFileNative(const String & /* file_name_from */, const String & /* file_name_to */)
{
throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Native copy not implemented for backup writer");
}
}

11
src/Disks/DiskType.cpp Normal file
View File

@ -0,0 +1,11 @@
#include "DiskType.h"
namespace DB
{
bool DataSourceDescription::operator==(const DataSourceDescription & o) const
{
return std::tie(type, description, is_encrypted) == std::tie(o.type, o.description, o.is_encrypted);
}
}