mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-10-01 22:20:50 +00:00
26 lines
572 B
C++
26 lines
572 B
C++
#include <Access/IAccessEntity.h>
|
|
#include <Access/Quota.h>
|
|
#include <Access/RowPolicy.h>
|
|
#include <Access/User.h>
|
|
#include <common/demangle.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
String IAccessEntity::getTypeName(std::type_index type)
|
|
{
|
|
if (type == typeid(User))
|
|
return "User";
|
|
if (type == typeid(Quota))
|
|
return "Quota";
|
|
if (type == typeid(RowPolicy))
|
|
return "Row policy";
|
|
return demangle(type.name());
|
|
}
|
|
|
|
bool IAccessEntity::equal(const IAccessEntity & other) const
|
|
{
|
|
return (full_name == other.full_name) && (getType() == other.getType());
|
|
}
|
|
}
|