Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5948020
commit 6443211
Showing
19 changed files
with
170 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#include <Backups/BackupEntryReference.h> | ||
|
||
namespace DB | ||
{ | ||
|
||
namespace ErrorCodes | ||
{ | ||
|
||
extern const int NOT_IMPLEMENTED; | ||
|
||
} | ||
|
||
BackupEntryReference::BackupEntryReference(std::string reference_target_) | ||
: reference_target(std::move(reference_target_)) | ||
{} | ||
|
||
bool BackupEntryReference::isReference() const | ||
{ | ||
return true; | ||
} | ||
|
||
String BackupEntryReference::getReferenceTarget() const | ||
{ | ||
return reference_target; | ||
} | ||
|
||
UInt64 BackupEntryReference::getSize() const | ||
{ | ||
return 0; | ||
} | ||
|
||
UInt128 BackupEntryReference::getChecksum(const ReadSettings & /*read_settings*/) const | ||
{ | ||
throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Checksum not implemented for reference backup entries"); | ||
} | ||
|
||
std::unique_ptr<SeekableReadBuffer> BackupEntryReference::getReadBuffer(const ReadSettings & /*read_settings*/) const | ||
{ | ||
throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Reading not implemented for reference backup entries"); | ||
} | ||
|
||
DataSourceDescription BackupEntryReference::getDataSourceDescription() const | ||
{ | ||
throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Data source description not implemented for reference backup entries"); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#pragma once | ||
|
||
#include <Backups/IBackupEntry.h> | ||
|
||
namespace DB | ||
{ | ||
|
||
/// Represents a reference to another backup entry. | ||
class BackupEntryReference : public IBackupEntry | ||
{ | ||
public: | ||
explicit BackupEntryReference(std::string reference_target_); | ||
|
||
UInt64 getSize() const override; | ||
UInt128 getChecksum(const ReadSettings & read_settings) const override; | ||
std::unique_ptr<SeekableReadBuffer> getReadBuffer(const ReadSettings & read_settings) const override; | ||
DataSourceDescription getDataSourceDescription() const override; | ||
|
||
bool isReference() const override; | ||
String getReferenceTarget() const override; | ||
private: | ||
String reference_target; | ||
}; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.