ClickHouse/src/Databases/DatabaseReplicatedHelpers.cpp
tavplubix 7a43a87f5b
Use shard and replica name from Replicated database arguments (#31488)
* fix another issue

* use shard and replica name from Replicated database

* fix

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-11-23 12:41:54 +03:00

18 lines
428 B
C++

#include <Databases/DatabaseReplicatedHelpers.h>
#include <Databases/DatabaseReplicated.h>
namespace DB
{
String getReplicatedDatabaseShardName(const DatabasePtr & database)
{
return assert_cast<const DatabaseReplicated *>(database.get())->getShardName();
}
String getReplicatedDatabaseReplicaName(const DatabasePtr & database)
{
return assert_cast<const DatabaseReplicated *>(database.get())->getReplicaName();
}
}