Add implementation of C++ API Node::RemoveProperty (#1128)
This commit is contained in:
@@ -637,6 +637,9 @@ class Node {
|
||||
/// @brief Sets the chosen property to the given value.
|
||||
void SetProperty(std::string property, Value value);
|
||||
|
||||
/// @brief Removes the chosen property.
|
||||
void RemoveProperty(std::string property);
|
||||
|
||||
/// @brief Retrieves the value of the chosen property.
|
||||
Value GetProperty(const std::string &property) const;
|
||||
|
||||
@@ -2574,6 +2577,8 @@ inline void Node::SetProperty(std::string property, Value value) {
|
||||
mgp::vertex_set_property(ptr_, property.data(), value.ptr());
|
||||
}
|
||||
|
||||
inline void Node::RemoveProperty(std::string property) { SetProperty(property, Value()); }
|
||||
|
||||
inline Value Node::GetProperty(const std::string &property) const {
|
||||
mgp_value *vertex_prop = mgp::vertex_get_property(ptr_, property.data(), memory);
|
||||
return Value(steal, vertex_prop);
|
||||
|
||||
Reference in New Issue
Block a user