Cypher - 简要说明

 

节点 (标签)spa

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

关系 (类型)rem

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

 

模式变量 数学

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

 

数据类型io

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

运算符foreach

数学:   +      -      *      /      %     ^csv

比较: =       <>      <      >    <=    >=     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

相关文章
相关标签/搜索