Skip to main content

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

CategoryPages
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

TypeLiteralvalueType
Nullnull"NULL"
Booleantrue, false"BOOLEAN"
Integer42, 0xFF, 0o17"INTEGER"
Float3.14, 1.0e10"FLOAT"
String'hi', "there""STRING"
List[1, 2, 3]"LIST<T>"
Map{k: v}"MAP"
Date, Time, DateTime, LocalTime, LocalDateTimevia constructor"DATE", "TIME", …
Durationduration('P30D')"DURATION"
Pointpoint({x, y})"POINT"
Vectorvector([1,2,3], 3, INTEGER)"VECTOR<INTEGER>(3)"
Node, Relationship, Pathproduced by queries"NODE", …

Where each type shows up

SourceLifetime
Node / relationship propertyPersists in the graph until deleted
RETURN expressionOne row, then gone
ParameterPer-query call
WITH bindingCurrent pipeline stage
Function argument / resultPer 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.

TypeHydrated 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 Relationship

Narrow 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 valueType(x) to discover a value's type at query time.

RETURN valueType(1),                                -- 'INTEGER'
valueType([1, 2, 3]), -- 'LIST<INTEGER>'
valueType(date('2024-01-15')), -- 'DATE'
valueType(point({x: 1, y: 2})), -- 'POINT'
valueType(vector([1,2,3], 3, INTEGER)) -- 'VECTOR<INTEGER>(3)'

VECTOR is the only built-in type whose valueType 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 valueType(x) = 'INTEGER')
RETURN n

Distinguish graph types

MATCH (n)
RETURN valueType(n) AS t, count(*) ORDER BY count(*) DESC
-- typically all NODE, but useful for generic projections

Conversion matrix

From → TotoIntegertoFloattoStringtoBoolean
Boolean1 / 01.0 / 0.0'true' / 'false'
IntegerFloat(n)decimal digits0 → false, non-zero → true
Floattruncatesdecimal string
Stringparses / nullparses / null'true' / 'false' / null
Nullnullnullnullnull

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:

HostLoraDB
null / None / undefinedNull
bool / booleanBoolean
int / integer number / i64Integer
float / non-integer number / f64Float
str / StringString
list / array / VecList
dict / object / BTreeMapMap
helpers (date(), wgs84(), …)Date, Point, etc.
vector() helper / tagged {kind: "vector", …} objectVector

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 = null is not true — it's null. Use IS NULL.
  • valueType(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 — use coalesce or CASE to supply defaults.

Equality and ordering semantics

TypeEqualityOrdering
Scalars (Boolean, Integer, Float, String)Per-typePer-type total order
NullPropagates to nullLast ASC / first DESC
ListElement-wise, same lengthLex (element-by-element)
MapKey/value set equal— (not ordered)
PointAll components + SRID— (not ordered)
TemporalsSame type, same instantPer-type chronological
VectorCoord type + dimension + every value — differs across coord types even with equal valuesDeterministic but unspecified — order by a scalar score instead
Node / RelationshipBy internal id()
PathStructural 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 — not supported; store base64 strings in String.
  • 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