Supported Data Types in LoraDB
Every value in LoraDB — stored as a
property, projected in a
RETURN, or bound as a
parameter — has one of the types below.
Category pages
| Category | Pages |
|---|---|
| Scalars (null, boolean, integer, float, string) | Scalars |
| Collections (lists, maps) | Lists & Maps |
| Temporal (date, time, datetime, duration) | Temporal |
| Spatial (points) | Spatial |
| Vectors (typed fixed-dimension coordinates) | Vectors |
| Graph (node, relationship, path) | below |
At-a-glance table
| Type | Example | type.of |
|---|---|---|
Null | null | "NULL" |
Boolean | true, false | "BOOLEAN" |
Integer | 42, 0xFF, 0o17 | "INTEGER" |
Float | 3.14, 1.0e10 | "FLOAT" |
String | 'hi', "there" | "STRING" |
List | [1, 2, 3] | "LIST<T>" |
Map | {k: v} | "MAP" |
Date, Time, DateTime, LocalTime, LocalDateTime | '2024-01-15'::DATE, '12:00:00'::TIME | "DATE", "TIME", … |
Duration | 'P30D'::DURATION | "DURATION" |
Point | {x, y}::POINT | "POINT" |
Vector | [1,2,3]::VECTOR<INTEGER>(3) | "VECTOR<INTEGER>(3)" |
Node, Relationship, Path | produced by queries | "NODE", … |
Where each type shows up
| Source | Lifetime |
|---|---|
| Node / relationship property | Persists in the graph until deleted |
RETURN expression | One row, then gone |
| Parameter | Per-query call |
WITH binding | Current pipeline stage |
| Function argument / result | Per expression |
Graph types (Node, Relationship, Path) are special: they appear
only in results, never as storable property values.
Graph types
Produced by queries; not storable as properties.
| Type | Hydrated shape |
|---|---|
Node | {kind: "node", id, labels, properties} |
Relationship | {kind: "relationship", id, startId, endId, type, properties} |
Path | {kind: "path", nodes, rels} — alternating sequence |
MATCH (a:Person)-[r:KNOWS]->(b:Person)
RETURN a, r, b // a, b are Nodes; r is a RelationshipNarrow graph-typed results in host code with isNode /
isRelationship / isPath (JS —
Node), is_node /
is_relationship / is_path (Python —
guards),
IsNode / IsRelationship / IsPath (Go —
guards), or
LoraRuby.node? / relationship? / path? (Ruby —
guards).
Runtime type checking
Use type.of(x)
to discover a value's type at query time.
RETURN type.of(1), // 'INTEGER'
type.of([1, 2, 3]), // 'LIST<INTEGER>'
type.of('2024-01-15'::DATE), // 'DATE'
type.of({x: 1, y: 2}::POINT), // 'POINT'
type.of([1,2,3]::VECTOR<INTEGER>(3)) // 'VECTOR<INTEGER>(3)'VECTOR is the only built-in type whose type.of tag encodes
structural detail (coordinate type + dimension). Everything else
returns a plain tag like INTEGER or LIST<INTEGER>.
Filter by runtime type
Useful on heterogeneous list properties:
MATCH (n:Record)
WHERE all(x IN n.values WHERE type.of(x) = 'INTEGER')
RETURN nDistinguish graph types
MATCH (n)
RETURN type.of(n) AS t, count(*) ORDER BY count(*) DESC
// typically all NODE, but useful for generic projectionsConversion matrix
| From → To | toInteger | toFloat | toString | toBoolean |
|---|---|---|---|---|
Boolean | 1 / 0 | 1.0 / 0.0 | 'true' / 'false' | — |
Integer | — | Float(n) | decimal digits | 0 → false, non-zero → true |
Float | truncates | — | decimal string | — |
String | parses / null | parses / null | — | 'true' / 'false' / null |
Null | null | null | null | null |
See toString / toInteger / toFloat / toBoolean
for the full specification.
Parameter binding
Host language values map to LoraDB types as follows — see your binding's "Parameters" section for specifics:
| Host | LoraDB |
|---|---|
null / None / undefined | Null |
bool / boolean | Boolean |
int / integer number / i64 | Integer |
float / non-integer number / f64 | Float |
str / String | String |
list / array / Vec | List |
dict / object / BTreeMap | Map |
host helpers (date(), wgs84(), …) | Date, Point, etc. |
vector() helper / tagged {kind: "vector", …} object | Vector |
Those helpers belong to the host binding APIs. In Cypher query text,
construct typed values with casts such as '2026-05-01'::DATE,
{x: 1, y: 2}::POINT, or [1, 2, 3]::VECTOR<INTEGER>(3).
Details: Rust, Node, Python, WASM, Go, Ruby.
Null across types
Every type has a single sentinel Null value — there's no
Integer null distinct from String null. Implications:
null = nullis nottrue— it'snull. UseIS NULL.type.of(null)is'NULL', not'NULL<INTEGER>'.- Missing map keys and missing properties return
null, so a null property and an absent property are indistinguishable. See Properties → Missing vs null. - Arithmetic and most functions propagate
null— usecoalesceorCASEto supply defaults.
Equality and ordering semantics
| Type | Equality | Ordering |
|---|---|---|
Scalars (Boolean, Integer, Float, String) | Per-type | Per-type total order |
Null | Propagates to null | Last ASC / first DESC |
List | Element-wise, same length | Lex (element-by-element) |
Map | Key/value set equal | — (not ordered) |
Point | All components + SRID | — (not ordered) |
| Temporals | Same type, same instant | Per-type chronological |
Vector | Coord type + dimension + every value — differs across coord types even with equal values | Deterministic but unspecified — order by a scalar score instead |
Node / Relationship | By internal id() | — |
Path | Structural equality | — |
Anything left unordered has equality only — attempting
ORDER BY on a map/point/node column doesn't
raise, but the sort is effectively a no-op.
What isn't a type
- Binary / byte arrays — supported as byte-string properties through binding wire formats; there is no Cypher byte literal.
- Fixed-precision decimals — not supported; use scaled integers or strings.
- User-defined types — not supported.
- Enums — not a native type; use a string or integer by convention.
See Limitations for the full list.
See also
- Scalars, Lists & Maps, Temporal, Spatial — per-type reference.
- Functions → Overview — casts,
coalesce,type.of. - Properties — how types attach to entities.
- Queries → Parameters — binding typed values from the host.
- Result formats — how these types come back over the wire.