字符串函数
基本字符串函数
- toString() - 转换为字符串
- toUpper() - 转换为大写
- toLower() - 转换为小写
- trim() - 去除两端空白
- replace() - 替换字符串
- substring() - 提取子串
- size() - 返回字符串长度
- split() - 按分隔符分割
- reverse() - 反转字符串
- contains() - 检查包含
- startsWith() - 检查开头
- endsWith() - 检查结尾
MATCH (p:Person)
RETURN ID(p),LOWER(p.character)
聚合函数
MATCH (p:Person)
RETURN MAX(p.money),SUM(p.money)
关系函数
match p = (:Person{name: "wzk5"})-[r:Friend]-(:Person) return STARTNODE(r);
最短Path
MATCH p=shortestPath( (node1)-[*]-(node2) )
RETURN length(p), nodes(p)
多深度关系点
直接拼接关系节点查询
match (na:Person{name:"wzk1"})-[re]->(nb:Person)-[re2]->(nc:Person) return na,re,nb,re2,nc
使用深度运算符
match data = (na:Person{name:"wzk1"})-[*1..2]-(nb:Person) return data