Hey, are list comprehensions supported in AGE? Using syntax from Neo4j doesnt seem to work, simple example: ``` SELECT * FROM cypher('g1', $$ MATCH (v) RETURN [x in v.array_field] $$) as (a agtype); ```
Activity
Halkrine commentedon Aug 17, 2021
You mean that this query(array_field) is working or not with AGE?
I tried that query. Once it works as 'query' (return as jsonb from Pgadmin).
But I'm not sure this result is correct(Because it returns null).
Someone who knows this issue?
ilyalasy commentedon Aug 17, 2021
array_field is some random array which is an attribute of a graph vertex.
i'm trying it with AGE and receiving following error:
Halkrine commentedon Aug 17, 2021
replace x -> v and try it.
ilyalasy commentedon Aug 17, 2021
no, it should be another variable: it should iterate through the array like in any list comprehension
Halkrine commentedon Aug 18, 2021
Understood.
Maybe, that function is not supported yet now..
JoshInnis commentedon Aug 18, 2021
Hi, List Comprehensions are not currently supported
jasperblues commentedon Sep 20, 2022
Its a useful feature. Not sure if it will be the case on AGE but with Neo4j they can especially help with performance.
jrgemignani commentedon Sep 20, 2022
List comp. was "nearly" completed until it was found to have serious issues for any nested cases. It will be revisited soon.