字符串函数

基本字符串函数

  1. toString() - 转换为字符串
  2. toUpper() - 转换为大写
  3. toLower() - 转换为小写
  4. trim() - 去除两端空白
  5. replace() - 替换字符串
  6. substring() - 提取子串
  7. size() - 返回字符串长度
  8. split() - 按分隔符分割
  9. reverse() - 反转字符串
  10. contains() - 检查包含
  11. startsWith() - 检查开头
  12. 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