1#include <Access/IAccessEntity.h>
2#include <Access/Quota.h>
3#include <Access/RowPolicy.h>
4#include <common/demangle.h>
5
6
7namespace DB
8{
9String IAccessEntity::getTypeName(std::type_index type)
10{
11 if (type == typeid(Quota))
12 return "Quota";
13 if (type == typeid(RowPolicy))
14 return "Row policy";
15 return demangle(type.name());
16}
17
18bool IAccessEntity::equal(const IAccessEntity & other) const
19{
20 return (full_name == other.full_name) && (getType() == other.getType());
21}
22}
23