mgp::Graph g(memgraph_graph);
const auto record_factory = mgp::RecordFactory(result);
auto nodes = g.Nodes();
auto it = nodes.begin();
while (it != nodes.end()) {
mgp::Node node = *it;
int64_t id = node.Id().AsInt();
std::unordered_map<std::string, mgp::Value> props = node.Properties();
auto pIt = props.begin();
while(pIt != props.end()) {
auto record = record_factory.NewRecord();
record.Insert("id", id);
record.Insert("property_name", pIt->first);
record.Insert("type", TypeToString(pIt->second.Type()));
record.Insert("value", pIt->second.ToString());
pIt++;
}
it++;
}
}
User provided us with this code of their custom QM function. When using it++, a std::variant is valueless exception is thrown. This happens when it++ is called for the second time. When using ++it, everything works good. This could happen because something is missing from Cpp API?
void list_nodes(mgp_list args, mgp_graphmemgraph_graph, mgp_result result, mgp_memorymemory) { mgp::memory = memory;
}
User provided us with this code of their custom QM function. When using it++, a std::variant is valueless exception is thrown. This happens when it++ is called for the second time. When using ++it, everything works good. This could happen because something is missing from Cpp API?