简体   繁体   中英

ArangoDB AQL: find null object, which is not part of the query

I have a problem with AQL. In the query I search for a certain value and expect to get a result with edges containing the search value. It seems okay, but I also get a null value. It seems that there is a null value in the database, which of course should not be. But since the null value doesn't match the requirements, I'm surprised that it appears at all.

Can anyone explain, why this is happening?

FOR v,e,p IN 1..10 Any 'myNode/12345' Graph 'My-Mesh' OPTIONS { uniqueVertices:'global', bfs:true } FILTER p.edges[*].MyId ALL == '50347099' RETURN DISTINCT e

example result:

[
  null,
  {
    "_key": "50348764",
    "_id": "relation/50348764",
    "_from": "example1/123",
    "_to": "Object/123123",
    "_rev": "_Zb5VKba--D",
    "properties": {},
    "MyId ": "50347099"
  },
  {
    "_key": "50348772",
    "_id": "relation/50348772",
    "_from": "example2/234",
    "_to": "Object/345345",
    "_rev": "_Zb5VKba--L",
    "properties": {},
    "MyId ": "50347099"
  }
]

Are you sure you didn't start your traversal from 0 (ie FOR v,e,p IN 0..10 Any )?

In that case it would make sense to get null as the first value since the first vertex will have no edge linking it to the previous vertex.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM