Cypher - 简要说明

 

节点 (标签)

() (n)  (:User)   (n:User)   (u:User{id:1,name:'may'}) 
 

关系 (类型)

--      -[r]-     -[:ORG]-       -[r:ORG]-     -[r:ORG{type:'aaa'}]-       //无向关系
-->   -[r]->   -[:ORG]->    -[r:ORG]->   -[r:ORG{type:'aaa'}]->         //有向关系

 

模式变量 

p = (:User) -[:ORG]-> (:User)

 

数据类型

数值型             如: 1,2,
字符串             如:‘a’ , “b”
布尔型             如: true ,false
节点                如: ()
关系                如: --> , --  ,<--
路径                如:  ()--()   , ()<--()
map               如: {id:1}
list                 如:[1,2,3]
null               任何类型
 

运算符

数学:   +      -      *      /      %     ^

比较: =       <>      <      >    <=    >=     IS NULL    IS NOT NULL

布尔:  AND          OR          XOR         NOT

字符:  +         =~ 

列表:   IN

链式比较:  mathc(n) where 21 < n.age < 30 return n

 

注意与null 比较都返回 null: 
null = null   结果 null
null <> null   结果 null

//     注释

 //

语句

读语句: match  /  optional match    /    where   /   start   /   aggregation     /   load csv

写语句:create  /  merge   /  set  /  delete  /  remove   /  foreach   /   create unique

通用语句:return   /  order by   /   limit   / skip    /  with   /  unwind   /  all  union   /  call

 

 

 

 

转载于:https://my.oschina.net/u/2552286/blog/3070324

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值