ArcFlow
Company
Managed Services
Markets
  • News
  • LOG IN
  • GET STARTED

OZ brings Visual Intelligence to physical venues, a managed edge layer that lets real-world environments see, understand, and act in real time.

Talk to us

ArcFlow

  • World Models
  • Sensors

Managed Services

  • OZ VI Venue 1
  • Case Studies

Markets

  • Sports
  • Broadcasting
  • Robotics

Company

  • About
  • Technology
  • Careers
  • Contact

Ready to see it live?

Talk to the OZ team about deploying at your venues, from a single pilot match to a full regional rollout.

Schedule a deployment review

© 2026 OZ. All rights reserved.

LinkedIn
ArcFlow Docs
Get Started
  • Get Started
  • Quickstart
  • Installation
  • Project Setup
  • Platforms
  • Bindings
  • Licensing
  • Pricing
Capabilities
  • Vector Search
  • Graph Algorithms
  • Sync
  • MCP Server (AI Agents)
  • Live Queries
  • Programs
  • Temporal
  • Spatial
  • Trusted RAG
  • Behavior Graph
  • Agent-Native
  • Event Sourcing
  • GPU Acceleration
  • Intent Relay
Concepts
  • World Model
  • Graph Model
  • Query Language (GQL)
  • Graph Patterns
  • SQL vs GQL
  • Parameters
  • Query Results
  • Persistence & WAL
  • Error Handling
  • Observations & Evidence
  • Confidence & Provenance
  • Proof Artifacts & Gates
  • Skills
GQL / WorldCypher
  • Overview
  • MATCH
  • WHERE
  • RETURN
  • OPTIONAL MATCH
  • CREATE
  • SET
  • MERGE
  • DELETE
  • REMOVE
  • WITH
  • UNION
  • UNWIND
  • CASE
  • Spatial Queries
  • Temporal Queries
  • Algorithms Reference
  • Triggers
Schema
  • Overview
  • Indexes
  • Constraints
  • Data Types
Functions
  • Built-in Functions
  • Aggregations
  • Procedures
  • Shortest Path
  • EXPLAIN
  • PROFILE
Skills
  • Overview
  • CREATE SKILL
  • PROCESS NODE
  • REPROCESS EDGES
Operations
  • CLI
  • REPL Commands
  • Snapshot & Restore
  • Server Modes & PG Wire
  • Persistence
  • Import & Export
  • Docker
  • Architecture
  • Cloud Architecture
  • Sync Protocol (Deep Dive)
Guides
  • Agent Integration
  • World Model
  • Graph Model Fundamentals
  • Trusted RAG
  • Using Skills
  • Behavior Graphs
  • Swarm & Multi-Agent
  • Migration Guide
  • Filesystem Workspace
  • From SQL to GQL
  • ArcFlow for Coding Agents
  • Data Quality & Pipeline Integrity
  • Code Intelligence
Tutorials
  • Knowledge Graph
  • Entity Linking
  • Vector Search
  • Graph Algorithms
Recipes
  • CRUD
  • Multi-MATCH
  • MERGE (Upsert)
  • Full-Text Search
  • Temporal Queries
  • Batch Projection
  • GraphRAG
Use Cases
  • Agent Tooling
  • Knowledge Management
  • RAG Pipeline
  • Fraud Detection
  • Sports Analytics
  • Grounded Neural Objects
  • Behavior Graphs
  • Autonomous Systems
  • Digital Twins
  • Robotics & Perception
Reference
  • TypeScript API
  • GQL Conformance
  • Compatibility Matrix
  • Glossary
  • Data Types
  • Operators
  • Error Codes
  • Known Issues

Built-in Functions

This reference is designed for both human developers and AI coding agents. Every entry includes complete syntax that can be used directly in queries.

83 built-in functions across 9 categories: Aggregation (11), String (23), Math (17), Type Conversion (5), Graph Introspection (6), Node Metadata (5), Map and List (4), Date/Time (4), Utility (4), and Predicates (4).

Aggregation (11)#

Aggregation functions operate across rows in a result set. Use with or without GROUP BY (via WITH).

FunctionSyntaxDescriptionReturn TypeSince
countcount(expr)Number of non-null valuesInteger0.4.0
count(DISTINCT)count(DISTINCT expr)Number of distinct non-null valuesInteger0.4.0
sumsum(expr)Sum of numeric valuesFloat0.4.0
avgavg(expr)Arithmetic meanFloat0.4.0
minmin(expr)Minimum valueSame as input0.4.0
maxmax(expr)Maximum valueSame as input0.4.0
collectcollect(expr)Collect values into a listList0.4.0
percentilepercentile(expr, p)Percentile value (p between 0.0 and 1.0)Float4.0.0
stdevstdev(expr)Sample standard deviationFloat4.0.0
variancevariance(expr)Sample varianceFloat4.0.0
medianmedian(expr)Median (50th percentile)Float4.0.0
MATCH (n:Person)
RETURN count(n) AS total, avg(n.age) AS avgAge, percentile(n.score, 0.95) AS p95
MATCH (n:Person)
WITH n.department AS dept, collect(n.name) AS members, stdev(n.salary) AS salaryStdev
RETURN dept, members, salaryStdev

String (23)#

FunctionSyntaxDescriptionReturn TypeSince
toLowertoLower(s)Convert to lowercaseString0.17.0
toUppertoUpper(s)Convert to uppercaseString0.17.0
trimtrim(s)Strip leading and trailing whitespaceString0.17.0
ltrimltrim(s)Strip leading whitespaceString4.0.0
rtrimrtrim(s)Strip trailing whitespaceString4.0.0
substringsubstring(s, start, len)Extract substring from start positionString0.17.0
leftleft(s, n)First n charactersString0.17.0
rightright(s, n)Last n charactersString0.17.0
headhead(expr)First element of a list or comma-separated stringSame as element3.0.0
lastlast(expr)Last element of a list or comma-separated stringSame as element3.0.0
replacereplace(s, find, rep)Replace all occurrences of find with repString0.17.0
splitsplit(s, delim)Split string by delimiter into listList0.17.0
reversereverse(s)Reverse a string or comma-separated listString0.17.0
sortsort(expr)Alphabetically sort comma-separated string valuesString4.0.0
repeatrepeat(s, n)Repeat string n timesString4.0.0
lpadlpad(s, width, char)Left-pad string to width with charString4.0.0
rpadrpad(s, width, char)Right-pad string to width with charString4.0.0
containscontains(s, sub)True if string contains substringBoolean4.0.0
startsWithstartsWith(s, prefix)True if string starts with prefixBoolean4.0.0
endsWithendsWith(s, suffix)True if string ends with suffixBoolean4.0.0
indexOfindexOf(s, sub)Position of substring, -1 if not foundInteger4.0.0
sizesize(s)Length of string or listInteger0.10.0
toStringtoString(expr)Convert any value to string representationString0.10.0
MATCH (n:Person)
RETURN toLower(n.name) AS lower, left(n.name, 3) AS initials, size(n.name) AS len
MATCH (n:Person)
WHERE startsWith(n.email, 'admin')
RETURN n.name, replace(n.email, '@old.com', '@new.com') AS newEmail
MATCH (n:Person)
RETURN lpad(toString(n.id), 6, '0') AS paddedId, repeat('*', n.rating) AS stars

Math (17)#

FunctionSyntaxDescriptionReturn TypeSince
absabs(expr)Absolute valueFloat4.0.0
roundround(expr)Round to nearest integerFloat4.0.0
ceilceil(expr)Ceiling (round up)Float4.0.0
floorfloor(expr)Floor (round down)Float4.0.0
sqrtsqrt(expr)Square rootFloat4.0.0
signsign(expr)Signum: -1, 0, or 1Float4.0.0
expexp(expr)e raised to the power of the valueFloat4.0.0
loglog(expr)Natural logarithm (ln)Float4.0.0
log10log10(expr)Base-10 logarithmFloat10.0.0
log2log2(expr)Base-2 logarithmFloat10.0.0
powerpower(base, exp)Raise base to exponentFloat4.0.0
sinsin(expr)Sine (radians)Float4.0.0
coscos(expr)Cosine (radians)Float4.0.0
tantan(expr)Tangent (radians)Float4.0.0
atan2atan2(y, x)Arctangent of y/x (radians)Float4.0.0
pipi()Pi constant (3.14159...)Float4.0.0
ee()Euler's number (2.71828...)Float4.0.0
MATCH (n:Sensor)
RETURN n.name, abs(n.reading) AS magnitude, round(n.value * 100) / 100 AS rounded
MATCH (n:Point)
RETURN atan2(n.y, n.x) AS angle, sqrt(power(n.x, 2) + power(n.y, 2)) AS distance

Type Conversion (5)#

FunctionSyntaxDescriptionReturn TypeSince
toStringtoString(expr)Convert to stringString0.10.0
toIntegertoInteger(expr)Convert to integerInteger0.10.0
toFloattoFloat(expr)Convert to floatFloat0.10.0
toBooleantoBoolean(expr)Convert to booleanBoolean4.0.0
coalescecoalesce(a, b, ...)First non-null valueSame as first non-null0.10.0
MATCH (n:Person)
RETURN toInteger(n.ageStr) AS age, coalesce(n.nickname, n.name) AS displayName

Graph Introspection (6)#

FunctionSyntaxDescriptionReturn TypeSince
idid(n)Internal node or relationship IDInteger0.8.0
labelslabels(n)List of labels on a nodeList<String>0.8.0
typetype(r)Relationship type stringString0.8.0
degreedegree(n)Total degree (in + out)Integer3.0.0
inDegreeinDegree(n)Incoming relationship countInteger3.0.0
outDegreeoutDegree(n)Outgoing relationship countInteger3.0.0
MATCH (n:Person)
RETURN n.name, degree(n) AS connections, inDegree(n) AS followers, outDegree(n) AS following
ORDER BY degree(n) DESC

Node Metadata (5)#

ArcFlow world-model metadata functions for provenance and trust scoring.

FunctionSyntaxDescriptionReturn TypeSince
confidenceconfidence(n)World-model confidence score (0.0-1.0)Float4.0.0
observationClassobservationClass(n)Observation class: observed, inferred, or predictedString4.0.0
authorityPlaneauthorityPlane(n)Authority plane: semantic or sceneString4.0.0
clockDomainclockDomain(n)Temporal clock domain nameString4.0.0
observationSourceobservationSource(n)Source identity (sensor, model, user)String4.0.0
MATCH (n:Observation)
WHERE confidence(n) > 0.8 AND observationClass(n) = 'observed'
RETURN n.name, confidence(n) AS conf, authorityPlane(n) AS plane

Map and List (4)#

FunctionSyntaxDescriptionReturn TypeSince
propertiesproperties(n)Full property map as stringString4.0.0
keyskeys(n)List of property key namesList<String>3.0.0
rangerange(start, end)Generate integer sequence [start..=end]List<Integer>4.0.0
mapProjectionn {.name, .age}Return only named properties as a mapMap4.0.0
MATCH (n:Person)
RETURN keys(n) AS propKeys, properties(n) AS allProps
MATCH (n:Person)
RETURN n {.name, .age} AS profile
UNWIND range(1, 10) AS i
RETURN i

Date/Time (4)#

All date/time functions are non-deterministic (they return the current time).

FunctionSyntaxDescriptionReturn TypeSince
timestamptimestamp()Current Unix timestamp in millisecondsInteger4.0.0
datedate()Current date as ISO string (YYYY-MM-DD)String4.0.0
timetime()Current time as ISO string (HH:MM:SS.mmm)String4.0.0
datetimedatetime()Current datetime as ISO string (YYYY-MM-DDTHH:MM:SS.mmm)String4.0.0
CREATE (e:Event {name: 'deploy', createdAt: timestamp(), date: date()})
RETURN e

Utility (4)#

FunctionSyntaxDescriptionReturn TypeSince
randomUUIDrandomUUID()Generate a UUID v4 stringString4.0.0
hashhash(expr)Deterministic FNV-1a 64-bit hash as hex stringString4.0.0
toJsontoJson(n)Serialize all node properties to JSON stringString4.0.0
sizesize(expr)Length of string or listInteger0.10.0
CREATE (n:Record {id: randomUUID(), fingerprint: hash(n.data)})
RETURN n
MATCH (n:Person)
RETURN toJson(n) AS json

Predicates (4)#

Predicate expressions used in WHERE clauses and RETURN.

PredicateSyntaxDescriptionReturn TypeSince
existsexists(n.prop)True if property existsBoolean0.6.0
IS NULLn.prop IS NULLTrue if property is null or missingBoolean0.15.0
IS NOT NULLn.prop IS NOT NULLTrue if property exists and is not nullBoolean0.15.0
INexpr IN [list]True if value is in the listBoolean0.20.0
MATCH (n:Person)
WHERE exists(n.email) AND n.role IN ['admin', 'editor']
RETURN n.name
MATCH (n:Person)
WHERE n.deletedAt IS NULL
RETURN n.name

Path Functions (3)#

Functions for operating on path values bound with MATCH p = ....

FunctionSyntaxDescriptionReturn Type
nodesnodes(path)Ordered list of nodes along the pathList<Node>
relationshipsrelationships(path)Ordered list of relationships along the pathList<Rel>
lengthlength(path)Number of relationships in the pathInteger
MATCH p = (a:Person {name: 'Alice'})-[*..5]->(b:Person {name: 'Dave'})
RETURN length(p) AS hops, [n IN nodes(p) | n.name] AS names

List Operations#

List subscript and slice#

-- Access by index (0-based)
RETURN n.tags[0]          -- first element
RETURN n.tags[$idx]       -- dynamic index via parameter
 
-- Slice
RETURN n.tags[1..3]       -- elements at index 1 and 2
RETURN n.tags[..3]        -- first 3 elements
RETURN n.tags[-2..]       -- last 2 elements

List comprehension#

-- [variable IN list WHERE filter | transform]
MATCH (n:Person)
RETURN [x IN n.scores WHERE x > 80 | x * 1.1] AS bonus_scores
 
-- filter only
RETURN [x IN n.tags WHERE x <> 'archived'] AS active_tags
 
-- transform only
RETURN [x IN range(1, 10) | x * x] AS squares

List quantifiers#

WHERE ALL(x IN n.scores WHERE x > 60)     -- all elements match
WHERE ANY(x IN n.tags WHERE x = 'urgent') -- at least one matches
WHERE NONE(x IN n.tags WHERE x = 'spam')  -- none match

See Also#

  • Aggregations & Window Functions -- GROUP BY, LAG, LEAD, PERCENT_RANK
  • Procedures -- CALL db.* and algo.* procedures
  • Operators -- comparison and logical operators
Try it
Open ↗⌘↵ to run
Loading engine…
← PreviousData TypesNext →Aggregations