/
githubmirror
/
nbs
Обзор
Документация
Войти
/
githubmirror
/
nbs
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
contrib/ydb/core/persqueue/pq_database.cpp
21 строка
626 B
alexv-smirnov
KIKIMR-18630 Switch Arcadia to contrib/ydb
05 ноя 2023, 22:32
05 ноя 2023, 22:32
e24498b
Код
Авторство
О чём код?
#include "pq_database.h" namespace NKikimr::NPQ { TString GetDatabaseFromConfig(const NKikimrPQ::TPQConfig& config) { if (config.HasDatabase()) { return config.GetDatabase(); } // Compatibility with configurations where database name is not specified // These configurations seem to always use <database>/PQ as their Root const TString& root = config.GetRoot(); if (root.EndsWith("/PQ")) { return root.substr(0, root.size() - 3); } // Fallback: try using Root as a database return root; } } // namespace NKikimr::NPQ