断言函数 - 计算并返回 true / false 值java
all( 变量 IN 集合 断言) // 判断是否一个断言适用于全部元素 all( x in nodes(p) where x.age>30 )node
any(变量 IN 集合 断言) // 判断是否一个断言适用于列表中的一个元素 any( x in a.array where x ='b') 数据库
none(变量 IN 集合 断言) //断言不适用于列表中的全部元素 none(x in nodes(p) where x.age=25 ) 函数
single(变量 IN 集合 断言) //断言恰好匹配至一个元素 single(x in nodes(p) where x.age=25 ) ip
exists(模式 或 属性) //只能用在节点的属性,或关系的属性 或 模式 exists(x.age) | exists( (n)-[:User]->(b) ) 字符串
标量函数 -- 返回一个单值部署
size( list ) //返回表中元素的个数 size([1,2,3])
size( pattern exp ) //计算结果集元素的个数,而不是表达式自己的长度 size( (a)-->()-->() )string
length( path ) // 返回路径的长度 length( (a)-->()-->() )
length( string ) //字符串长度 length( n.name )it
type( 关系 ) //关系类型 io
id(节点/关系) // 返回id
coalesce(exp,exp) //返回第一个非空值 ,若是都为空,返回 null coalesce(a.age,a.name,a.userId)
head(exp) //返回列表中的第一个元素 head(a.array)
last(exp) //返回列表中的最后一个元素
timestamp() //系统时间戳 13 位
startNode( 关系 ) // 返回一个关系的开始节点 startNode(r)
endNode( 关系 ) //返回一个关系的 结束节点 endNode(r)
properies() //返回节点或关系的全部属性
toInt() //字符串转为整形,若是失败返回 null . 浮点转为整数
toFloat() //同上
列表函数 -- 返回列表中的元素
nodes( path ) //返回一条路径中的全部节点 nodes( (a)-->()-->() )
relationships( path ) //返回一条路径中的全部关系
labels( node ) //返回节点的标签
keys( 节点/关系/map ) //返回节点/关系/map 的属性的 key
extract( 变量 in 集合 | exp ) //至关于 java stream.map (映射) extract( n in nodes(p) | n.name )
filter( 变量 IN 集合 断言 ) //过滤
tail( exp ) //返回列表中除了首元素以后的全部元素
range( start, end [, step] ) //返回范围内的数 range(1,100)
reduce( acc= init , 变量 in 集合 | exp ) //至关于 java stream.reduce reduce( total = 0, n in nodes(p) | total+n.age )
数值函数
abs()
ceil()
floor()
round()
sign()
rand()
对数函数
log()
log10()
exp()
e()
sqrt()
三角函数
sin()
cos()
tan()
cot()
asin()
acos()
atan()
atan2()
pi()
degrees()
radians()
haversin()
字符串函数
replace( orininal , search , replace )
substring( original , start , [, length] )
left( original , length )
right( original , length )
ltrim( original )
rtrim( original )
trim( original )
lower( original )
upper( original )
split( original ,split) //分割
reverse( original ) //反转
toString( exp ) toString(10) toString(true)
自定义函数
用java 编写,部署到数据库中。