function
- predicates(断言)
- all语法
ALL(identifier in collection WHERE predicate)
- any(至少一个),none,single(恰好一个)
- exist语法
EXISTS( pattern-or-property )
- all语法
- scalar(标量)
- coalesce(,,,)(合并)
返回第一个非空值,都为空则返回null
- head(x)
返回第一个节点,last与之相反
- toint(string or float等)
失败则返回null
- coalesce(,,,)(合并)
- collection
- NODES( path )
返回路径上的所有节点
- RELATIONSHIPS( path )
- LABELS( node )
- KEYS( property-container )
- EXTRACT( identifier in collection | expression )
- FILTER(identifier in collection WHERE predicate)
- TAIL( expression )
返回除了第一个之后的所有的
- RANGE( start, end [, step] )
- REDUCE( accumulator = initial, identifier in collection | expression )
accumulator保存结果
- NODES( path )
- 数学函数
- atan2(1,1) = pi/4 (取值范围 -pi 到 pi 之间(不包括 -pi))
- 半正矢量函数haversinθ=versinθ/2=(1-cos θ)/2
- RADIANS( expression ) 角度转弧度
- rand()
- SIGN( expression ) 取符号
- String
- RETURN str(1), str(“hello”)
两端加引号
- REPLACE( original, search, replace )
- SUBSTRING( original, start [, length] )
- LEFT( original, length ) 返回一个子串
- SPLIT( original, splitPattern )
- REVERSE( original )
- TOSTRING( expression ) 注意和str的区别
- RETURN str(1), str(“hello”)
schema
- index
- CREATE INDEX ON :Person(name)
- DROP INDEX ON :Person(name)
- constraint
- unique在cypher二中已经解释了
- exist约束
CREATE CONSTRAINT ON (book:Book) ASSERT exists(book.isbn)
DROP CONSTRAINT ON (book:Book) ASSERT exists(book.isbn)
Execution Plans
- Starting point operators
- Expand operators
- Combining operators
- Row operators
- Update Operators
时间: 2024-11-04 13:55:59