Add Relationship::RemoveProperty to C++ query module API (#1156)
This commit is contained in:
@@ -780,6 +780,9 @@ class Relationship {
|
||||
/// @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;
|
||||
|
||||
@@ -2726,6 +2729,8 @@ inline void Relationship::SetProperty(std::string property, Value value) {
|
||||
mgp::edge_set_property(ptr_, property.data(), value.ptr());
|
||||
}
|
||||
|
||||
inline void Relationship::RemoveProperty(std::string property) { SetProperty(property, Value()); }
|
||||
|
||||
inline Value Relationship::GetProperty(const std::string &property) const {
|
||||
mgp_value *edge_prop = mgp::MemHandlerCallback(edge_get_property, ptr_, property.data());
|
||||
return Value(steal, edge_prop);
|
||||
|
||||
Reference in New Issue
Block a user