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

Query Results

How to work with data returned from queries.

QueryResult structure#

Every db.query() and db.mutate() returns a result with:

interface QueryResult {
  columns: string[]      // Column names in result order
  rows: TypedRow[]       // Result rows with typed access
  rowCount: number       // Number of rows
  computeMs: number      // Execution time in milliseconds
  gqlstatus(): string    // ISO GQL status: "00000" = data, "02000" = no data
}

Accessing values#

By column name (recommended)#

const result = db.query("MATCH (n:Person) RETURN n.name, n.age")
 
for (const row of result.rows) {
  const name = row.get('name')   // string
  const age = row.get('age')     // number (automatically typed)
  console.log(name, age)
}

Column names match the query's RETURN clause. For RETURN n.name, the column is n.name — but the SDK also indexes the short form name, so both work:

row.get('n.name')  // works
row.get('name')    // also works (short form)

As a full object#

const obj = row.toObject()
// { 'n.name': 'Alice', 'n.age': 30, 'n.active': true }

Iterate all rows#

const result = db.query("MATCH (n:Person) RETURN n.name, n.age")
const people = result.rows.map(row => row.toObject())
// [{ 'n.name': 'Alice', 'n.age': 30 }, { 'n.name': 'Bob', 'n.age': 35 }]

Automatic type coercion#

The SDK automatically parses raw string values into their correct TypeScript types:

Raw ValueTypeScript TypeReturned As
'Alice'string'Alice'
'30'number30
'3.14'number3.14
'true'booleantrue
'false'booleanfalse
'' or 'null'nullnull

MutationResult#

db.mutate() returns a MutationResult which extends QueryResult with mutation statistics:

interface MutationResult extends QueryResult {
  nodesCreated: number
  nodesDeleted: number
  relationshipsCreated: number
  relationshipsDeleted: number
  propertiesSet: number
}

Checking empty results#

const result = db.query("MATCH (n:Missing) RETURN n")
if (result.rowCount === 0) {
  console.log('No results found')
}

ISO GQL status codes#

gqlstatus() returns the ISO/IEC 39075 GQL status for the result:

const result = db.query("MATCH (n:Person) WHERE n.age > 100 RETURN n.name")
result.gqlstatus()  // "02000" — query succeeded, no matching rows
// vs.
const result2 = db.query("MATCH (n:Person) RETURN n.name")
result2.gqlstatus() // "00000" — rows were returned
CodeMeaning
"00000"Success with data — at least one row returned
"02000"No data — query executed correctly but matched nothing

Timing#

const result = db.query("CALL algo.pageRank()")
console.log(`PageRank computed in ${result.computeMs.toFixed(1)}ms`)

See Also#

  • Parameters — always use $params placeholders for world model queries
  • TypeScript API Reference — full method signatures and return types
  • Error Handling — what db.query() throws and when
Try it
Open ↗⌘↵ to run
Loading engine…
← PreviousParametersNext →Persistence & WAL