Package com.darkcollective.relix.value.internal
package com.darkcollective.relix.value.internal
The engine-side machinery behind
com.darkcollective.relix.value: not exported by the published
artifact. What follows describes the package as a whole, as it stood before the split.
Runtime scalar value types for query execution.
The sealed Value interface
represents a single scalar value produced or consumed during query evaluation.
Its permitted subtypes map onto the ScalarType
lattice:
StringValue— textual dataNumberValue— arbitrary-precision decimal numbers (BigDecimal)BooleanValue— boolean flags; prefer theTRUE/FALSEconstantsNullValue— the absent value (SQLNULL); use the singletonINSTANCEDateValue,TimeValue,TimestampValue,DurationValue— the four temporal kinds, each holding the correspondingjava.timevalueStructValue,ArrayValue— nested values, which reportScalarType.ANY
Every subtype is immutable. Use exhaustive pattern matching on the sealed
hierarchy rather than instanceof chains.
Two utilities operate on values alone and so live beside them:
ValuePath reads a dotted/indexed path into a
nested value, and JsonValues converts between
JSON text and a Value tree.
-
ClassDescriptionStrings as sequences of code points — the unit relix counts, slices and orders a string by.Parses JSON text into the relix
Valuehierarchy — the boundary at which a nested document becomes native relix data: object →StructValuearray →ArrayValuestring →StringValuenumber →NumberValue(aBigDecimal)true/false→BooleanValuenull→NullValueThrown when the input is not well-formed JSON.Null-propagating navigation into nestedValues — the runtime engine behind path access likeuser.nameoritems[0].price.A single navigation step: into a named struct field, or an array index.Navigate into the struct field namedname(case-insensitive).Navigate into the array element at zero-basedindex.