function
- Predicates (assertion)
- All syntax
ALL(identifier in collection WHERE predicate)
- Any (at least one), None,single (exactly one)
- exist syntax
EXISTS( pattern-or-property )
- Scalar (scalar)
- COALESCE (,,,) (consolidated)
Returns NULL if the first non-null value is NULL
- Head (x)
Returns the first node, last with the opposite
- ToInt (string or float, etc.)
Failure returns null
- Collection
- NODES (PATH)
Return all nodes on the path
- Relationships (PATH)
- LABELS (node)
- KEYS (Property-container)
- EXTRACT (identifier in collection | expression)
- FILTER (identifier in collection WHERE predicate)
- TAIL (expression)
Return all except the first one.
- RANGE (Start, end [, step])
- REDUCE (accumulator = initial, identifier in collection | expression)
Accumulator Saving Results
- Mathematical functions
- ATAN2 (max) = PI/4 (range-pi to pi (not including-PI)
- Semi-positive vector function haversinθ=versinθ/2= (1-cosθ)/2
- RADIANS (expression) angle to radians
- RAND ()
- sign (expression) takes a symbol
- String
- RETURN Str (1), str ("Hello")
Add quotation marks to both ends
- Replace (original, search, replace)
- SUBSTRING (original, start [, length])
- Left (original, length) returns a substring
- SPLIT (original, Splitpattern)
- REVERSE (original)
- TOSTRING (expression) Note the difference from STR
Schema
- Index
- CREATE INDEX on:P erson (name)
- DROP INDEX on:P erson (name)
- Constraint
- The unique in Cypher two has explained
- exist constraints
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
Cypher Three (function, schema)