Support removed vertices in the triggers (#140)
This commit is contained in:
committed by
Antonio Andelic
parent
2f3fa656d9
commit
11c0dde11c
@@ -246,8 +246,18 @@ class DbAccessor final {
|
||||
return accessor_->DetachDeleteVertex(&vertex_accessor->impl_);
|
||||
}
|
||||
|
||||
storage::Result<bool> RemoveVertex(VertexAccessor *vertex_accessor) {
|
||||
return accessor_->DeleteVertex(&vertex_accessor->impl_);
|
||||
storage::Result<std::optional<VertexAccessor>> RemoveVertex(VertexAccessor *vertex_accessor) {
|
||||
auto res = accessor_->DeleteVertex(&vertex_accessor->impl_);
|
||||
if (res.HasError()) {
|
||||
return res.GetError();
|
||||
}
|
||||
|
||||
const auto &value = res.GetValue();
|
||||
if (!value) {
|
||||
return std::optional<VertexAccessor>{};
|
||||
}
|
||||
|
||||
return std::make_optional<VertexAccessor>(*value);
|
||||
}
|
||||
|
||||
storage::PropertyId NameToProperty(const std::string_view &name) { return accessor_->NameToProperty(name); }
|
||||
|
||||
Reference in New Issue
Block a user