mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-13 18:02:24 +00:00
24 lines
610 B
C++
24 lines
610 B
C++
#include <Backups/BackupEntryFromMemory.h>
|
|
#include <IO/ReadBufferFromString.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
BackupEntryFromMemory::BackupEntryFromMemory(const void * data_, size_t size_, const std::optional<UInt128> & checksum_)
|
|
: BackupEntryFromMemory(String{reinterpret_cast<const char *>(data_), size_}, checksum_)
|
|
{
|
|
}
|
|
|
|
BackupEntryFromMemory::BackupEntryFromMemory(String data_, const std::optional<UInt128> & checksum_)
|
|
: data(std::move(data_)), checksum(checksum_)
|
|
{
|
|
}
|
|
|
|
std::unique_ptr<ReadBuffer> BackupEntryFromMemory::getReadBuffer() const
|
|
{
|
|
return std::make_unique<ReadBufferFromString>(data);
|
|
}
|
|
|
|
}
|