Open pebbe opened 4 years ago
Can you try this once?
match p = (n1)-[r:rel*2]->(n2)
where all(x in to_jsonb(r) where x.properties.id is null)
Can you try this once?
match p = (n1)-[r:rel*2]->(n2) where all(x in to_jsonb(r) where x.properties.id is null)
Yes, that works. Thanks.
I've just run into a similar thing with the form
WHERE ALL(
r in relationships(p) WHERE ((type(r) = 'Contributes') OR (type(r) = 'Produces'))
)
using to_jsonb
on the relationships clause makes in
happy but then type
is unhappy because jsonb can't be cast to edge.
I agree agensgraph documentation is not that great. I am also struggling to figure out the connected component size in a undirected graph with the number of nodes as less as 15 and between any two nodes, there is a maximum of one edge guaranteed. I am applying a filter on edge property but it's taking too much time. More details in #522 .
@pebbe @j616 could you help me out here if you have come across this type of usecase.
In the AgensGraph Developer Manual, there are some Predicates functions, that should work on lists.
But when I try to use these, I get an error, saying a jsonb was expected, while it got a list:
When I convert the list to a jsonb, the error disappears, but I get zero results:
But that's wrong. There are matching patterns:
So how do I use the functions all(), any(), none(), and single() ?