Remove unused UnwrapDegreeResult
function
Reviewers: jseljan Reviewed By: jseljan Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D2797
This commit is contained in:
parent
02d3a04ffa
commit
df27b8477d
@ -745,24 +745,6 @@ std::vector<Symbol> ExpandVariable::ModifiedSymbols(
|
||||
|
||||
namespace {
|
||||
|
||||
size_t UnwrapDegreeResult(storage::Result<size_t> maybe_degree) {
|
||||
if (maybe_degree.HasError()) {
|
||||
switch (maybe_degree.GetError()) {
|
||||
case storage::Error::DELETED_OBJECT:
|
||||
throw QueryRuntimeException("Trying to get degree of a deleted node.");
|
||||
case storage::Error::NONEXISTENT_OBJECT:
|
||||
throw query::QueryRuntimeException(
|
||||
"Trying to get degree from a node that doesn't exist.");
|
||||
case storage::Error::SERIALIZATION_ERROR:
|
||||
case storage::Error::VERTEX_HAS_EDGES:
|
||||
case storage::Error::PROPERTIES_DISABLED:
|
||||
throw QueryRuntimeException(
|
||||
"Unexpected error when getting node degree.");
|
||||
}
|
||||
}
|
||||
return *maybe_degree;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function that returns an iterable over
|
||||
* <EdgeAtom::Direction, EdgeAccessor> pairs
|
||||
|
Loading…
Reference in New Issue
Block a user