data_dictionary:user_types_metadata: add has_type() function

Adds `has_type()` function to `user_types_metadata`. The functions
determins whether UDT with given name exists.
This commit is contained in:
Michał Jadwiszczak
2022-11-22 21:47:10 +01:00
parent 06cd03d3cd
commit 51a02e3bd7

View File

@@ -33,6 +33,9 @@ public:
void remove_type(user_type type) {
_user_types.erase(type->_name);
}
bool has_type(const bytes& name) const {
return _user_types.contains(name);
}
friend std::ostream& operator<<(std::ostream& os, const user_types_metadata& m);
};