summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorInnokentii Mokin <[email protected]>2026-01-14 18:38:40 +0300
committerGitHub <[email protected]>2026-01-14 18:38:40 +0300
commit9d754573e89b623f6686ccc6465071e902dbf9bb (patch)
tree90c9c9980186a0d66af2ac1c50682ef3ed55e6d8
parentdc19370a47f99419af5ff09d9ea6e630fac19635 (diff)
Add proper handling for backup collection as directory-like (#31767)
-rw-r--r--ydb/public/api/protos/ydb_scheme.proto1
-rw-r--r--ydb/public/lib/ydb_cli/common/print_utils.cpp5
-rw-r--r--ydb/public/lib/ydb_cli/common/recursive_list.cpp3
-rw-r--r--ydb/public/lib/ydb_cli/common/scheme_printers.cpp3
-rw-r--r--ydb/public/sdk/cpp/include/ydb-cpp-sdk/client/scheme/scheme.h1
-rw-r--r--ydb/public/sdk/cpp/src/client/scheme/scheme.cpp2
6 files changed, 13 insertions, 2 deletions
diff --git a/ydb/public/api/protos/ydb_scheme.proto b/ydb/public/api/protos/ydb_scheme.proto
index efe1ebaeffa..8b1a5f6f747 100644
--- a/ydb/public/api/protos/ydb_scheme.proto
+++ b/ydb/public/api/protos/ydb_scheme.proto
@@ -66,6 +66,7 @@ message Entry {
EXTERNAL_DATA_SOURCE = 19;
VIEW = 20;
RESOURCE_POOL = 21;
+ BACKUP_COLLECTION = 22;
TRANSFER = 23;
SYS_VIEW = 24;
STREAMING_QUERY = 26;
diff --git a/ydb/public/lib/ydb_cli/common/print_utils.cpp b/ydb/public/lib/ydb_cli/common/print_utils.cpp
index 497167cfbe2..41d2a9094f1 100644
--- a/ydb/public/lib/ydb_cli/common/print_utils.cpp
+++ b/ydb/public/lib/ydb_cli/common/print_utils.cpp
@@ -51,6 +51,9 @@ void PrintSchemeEntry(IOutputStream& o, const NScheme::TSchemeEntry& entry, NCol
case NScheme::ESchemeEntryType::StreamingQuery:
o << colors.LightWhite();
break;
+ case NScheme::ESchemeEntryType::BackupCollection:
+ o << colors.LightBlueColor();
+ break;
default:
o << colors.RedColor();
}
@@ -117,6 +120,8 @@ TString EntryTypeToString(NScheme::ESchemeEntryType entry) {
return "sys-view";
case NScheme::ESchemeEntryType::StreamingQuery:
return "streaming-query";
+ case NScheme::ESchemeEntryType::BackupCollection:
+ return "backup-collection";
case NScheme::ESchemeEntryType::Unknown:
case NScheme::ESchemeEntryType::Sequence:
return "unknown";
diff --git a/ydb/public/lib/ydb_cli/common/recursive_list.cpp b/ydb/public/lib/ydb_cli/common/recursive_list.cpp
index 91ca5f38cbc..cc350359c1b 100644
--- a/ydb/public/lib/ydb_cli/common/recursive_list.cpp
+++ b/ydb/public/lib/ydb_cli/common/recursive_list.cpp
@@ -40,7 +40,8 @@ namespace {
switch (child.Type) {
case ESchemeEntryType::SubDomain:
case ESchemeEntryType::ColumnStore:
- case ESchemeEntryType::Directory: {
+ case ESchemeEntryType::Directory:
+ case ESchemeEntryType::BackupCollection: {
auto status = RecursiveList(dst, client, Join('/', path, child.Name), settings);
if (!status.IsSuccess()) {
return status;
diff --git a/ydb/public/lib/ydb_cli/common/scheme_printers.cpp b/ydb/public/lib/ydb_cli/common/scheme_printers.cpp
index 94b05b9919b..db2a94bdbc7 100644
--- a/ydb/public/lib/ydb_cli/common/scheme_printers.cpp
+++ b/ydb/public/lib/ydb_cli/common/scheme_printers.cpp
@@ -22,7 +22,8 @@ void TSchemePrinterBase::Print() {
bool TSchemePrinterBase::IsDirectoryLike(const NScheme::TSchemeEntry& entry) {
return entry.Type == NScheme::ESchemeEntryType::Directory
|| entry.Type == NScheme::ESchemeEntryType::SubDomain
- || entry.Type == NScheme::ESchemeEntryType::ColumnStore;
+ || entry.Type == NScheme::ESchemeEntryType::ColumnStore
+ || entry.Type == NScheme::ESchemeEntryType::BackupCollection;
}
NThreading::TFuture<void> TSchemePrinterBase::PrintDirectoryRecursive(const TString& fullPath, const TString& relativePath) {
diff --git a/ydb/public/sdk/cpp/include/ydb-cpp-sdk/client/scheme/scheme.h b/ydb/public/sdk/cpp/include/ydb-cpp-sdk/client/scheme/scheme.h
index c0bd7cc3c50..148e33bc544 100644
--- a/ydb/public/sdk/cpp/include/ydb-cpp-sdk/client/scheme/scheme.h
+++ b/ydb/public/sdk/cpp/include/ydb-cpp-sdk/client/scheme/scheme.h
@@ -53,6 +53,7 @@ enum class ESchemeEntryType : i32 {
SysView = 22,
Transfer = 23,
StreamingQuery = 24,
+ BackupCollection = 25,
};
struct TVirtualTimestamp {
diff --git a/ydb/public/sdk/cpp/src/client/scheme/scheme.cpp b/ydb/public/sdk/cpp/src/client/scheme/scheme.cpp
index 69ff042ec78..04a8c0aee69 100644
--- a/ydb/public/sdk/cpp/src/client/scheme/scheme.cpp
+++ b/ydb/public/sdk/cpp/src/client/scheme/scheme.cpp
@@ -109,6 +109,8 @@ static ESchemeEntryType ConvertProtoEntryType(::Ydb::Scheme::Entry::Type entry)
return ESchemeEntryType::View;
case ::Ydb::Scheme::Entry::RESOURCE_POOL:
return ESchemeEntryType::ResourcePool;
+ case ::Ydb::Scheme::Entry::BACKUP_COLLECTION:
+ return ESchemeEntryType::BackupCollection;
case ::Ydb::Scheme::Entry::SYS_VIEW:
return ESchemeEntryType::SysView;
case ::Ydb::Scheme::Entry::TRANSFER: