This repository has been archived by the owner on May 23, 2019. It is now read-only.
cycli 0.5.0
Parameters
Export parameters with export key=value
.
> export name="Tom Hanks"
> export year=2005
> env
name=Tom Hanks
year=2005
> MATCH (p:Person {name:{name}})-[:ACTED_IN]->(m:Movie)
WHERE m.released > {year}
RETURN m.title, m.released;
| m.title | m.released
---+----------------------+------------
1 | Charlie Wilson's War | 2007
2 | Cloud Atlas | 2012
3 | The Da Vinci Code | 2006
12 ms
> export names=["Kevin Bacon", "Tom Hanks"]
> MATCH (p:Person) WHERE p.name IN {names} RETURN p;
| p
---+----------------------------------------------
1 | (n189:Person {born:1958,name:"Kevin Bacon"})
2 | (n241:Person {born:1956,name:"Tom Hanks"})
13 ms
> export col=[1,2,3]
> UNWIND {col} AS i
RETURN i;
| i
---+---
1 | 1
2 | 2
3 | 3
12 ms
> export map={"name":"Nicole", "age":24}
> env
col=[1, 2, 3]
name=Tom Hanks
names=['Kevin Bacon', 'Tom Hanks']
map={'age': 24, 'name': 'Nicole'}
year=1980
> UNWIND {map} AS row
RETURN row.name, row.age;
| row.name | row.age
---+----------+---------
1 | Nicole | 24
20 ms
> export fancy=[x ** 2 for x in range(5)]
> env["fancy"]
[0, 1, 4, 9, 16]