\a SELECT * FROM cypher('MATCH (m:Movie) WHERE m.title CONTAINS ''The Matrix'' RETURN id(m) AS id, m.title AS title, m.tagline AS tagline, m.released AS released ORDER BY id(m) DESC', '{}', 'multicorn_neo4j', 'testdb'); cypher {"id":10,"title":"The Matrix Revolutions","tagline":"Everything that has a beginning has an end","released":2003} {"id":9,"title":"The Matrix Reloaded","tagline":"Free your mind","released":2003} {"id":0,"title":"The Matrix","tagline":"Welcome to the Real World","released":1999} (3 rows) SELECT * FROM cypher('MATCH (m:Movie) WHERE m.title CONTAINS "The Matrix" RETURN id(m) AS id, m.title AS title, m.tagline AS tagline, m.released AS released ORDER BY id(m) DESC', '{}', 'multicorn_neo4j', 'testdb'); cypher {"id":10,"title":"The Matrix Revolutions","tagline":"Everything that has a beginning has an end","released":2003} {"id":9,"title":"The Matrix Reloaded","tagline":"Free your mind","released":2003} {"id":0,"title":"The Matrix","tagline":"Welcome to the Real World","released":1999} (3 rows) SELECT * FROM cypher('MATCH (m:Movie) WHERE m.title CONTAINS $search RETURN id(m) AS id, m.title AS title, m.tagline AS tagline, m.released AS released ORDER BY id(m) DESC','{''search'':''Matrix''}', 'multicorn_neo4j', 'testdb'); cypher {"id":10,"title":"The Matrix Revolutions","tagline":"Everything that has a beginning has an end","released":2003} {"id":9,"title":"The Matrix Reloaded","tagline":"Free your mind","released":2003} {"id":0,"title":"The Matrix","tagline":"Welcome to the Real World","released":1999} (3 rows) SELECT * FROM cypher('MATCH (m:Movie) WHERE m.title CONTAINS $search RETURN id(m) AS id, m.title AS title, m.tagline AS tagline, m.released AS released ORDER BY id(m) DESC','{"search":"Matrix"}', 'multicorn_neo4j', 'testdb'); cypher {"id":10,"title":"The Matrix Revolutions","tagline":"Everything that has a beginning has an end","released":2003} {"id":9,"title":"The Matrix Reloaded","tagline":"Free your mind","released":2003} {"id":0,"title":"The Matrix","tagline":"Welcome to the Real World","released":1999} (3 rows) SELECT name, born FROM cypher('MATCH (p:Person)-[r:ACTED_IN]->(m:Movie) WHERE m.title=$movie RETURN p.name AS name, p.born AS born ORDER BY born DESC','{"movie":"The Matrix"}', 'multicorn_neo4j', 'testdb') , json_to_record(cypher) as x(name varchar, born smallint); name|born Emil Eifrem|1978 Carrie-Anne Moss|1967 Keanu Reeves|1964 Laurence Fishburne|1961 Hugo Weaving|1960 (5 rows) select json_object_agg(key,value::jsonb-'id') as result from cypher('create (a:A {name : "test"}),(b:B {name : "thing"}),(c:B {name : "other"}) return *;') c, lateral json_each(c); result { "a" : {"labels": ["A"], "properties": {"name": "test"}}, "b" : {"labels": ["B"], "properties": {"name": "thing"}}, "c" : {"labels": ["B"], "properties": {"name": "other"}} } (1 row) select c->'r'->>'type' as rel_type,c->'r'->>'properties' as rel_properties,json_array_length(json_agg(n)) as node_count from cypher('match(a),(b) where a.name = "test" and b.name = "thing" CREATE (a)-[r:RELTYPE {name : "test-thing"}]->(b) return r;') c, lateral json_array_elements(c->'r'->'nodes') n group by 1,2; rel_type|rel_properties|node_count RELTYPE|{"name": "test-thing"}|2 (1 row) select c->'r'->>'type' as rel_type,c->'r'->>'properties' as rel_properties,json_array_length(json_agg(n)) as node_count from cypher('match(a),(b) where a.name = "thing" and b.name = "other" CREATE (a)-[r:RELTYPE {name : "thing-other"}]->(b) return r;') c, lateral json_array_elements(c->'r'->'nodes') n group by 1,2; rel_type|rel_properties|node_count RELTYPE|{"name": "thing-other"}|2 (1 row) select segment->>'type' as rel_type,segment->'properties' as rel_properties from cypher('match p = (a) - [*] -> (b) where a.name = "test" and b.name = "other" return p;') c, lateral json_array_elements(c->'p') segment; rel_type|rel_properties RELTYPE|{"name": "test-thing"} RELTYPE|{"name": "thing-other"} (2 rows)