Search code examples
gremlinazure-cosmosdb-gremlinapi

Is there any kind of inverse for the "has" function (contains at least 1) negated to (contains none)


I am looking for all cards where the key has been returned. Closest I have been able to find is the has and hasNot, but hasNot isnt property based.

Trying to get it to be something like this g.V().hasLabel('card').both().DOESNOTHAVE('keyReturned',false)

A hasAll would work as well


Solution

  • This is what I came up with

    g.V().hasLabel("Location").has("Name", "{location}").out("locatedat").not(out("being used by").has("approved", true).has("keyReturned", false))