Skip to main content

Module value

Module value 

Source
Expand description

Scalar value model and JSON conversion helpers.

Enums§

Scalar
A single canonical scalar value.

Constants§

ID_FIELD
The record or relationship id in a reconstructed entity and in language results (SQL, Cypher, GQL, Gremlin, Bolt).
LABEL_FIELD
The record label in a reconstructed record.
SOURCE_FIELD
The source record id in a reconstructed relationship.
TARGET_FIELD
The target record id in a reconstructed relationship.
TYPE_FIELD
The relationship type in a reconstructed relationship.

Functions§

infer_scalar
Infer a logical type and scalar from a JSON value.
is_reserved_name
Whether a normalized property name is reserved for the engine: every name starting with __ (ID_FIELD, LABEL_FIELD, __proptypes, __score, …). No record or relationship stores a property under such a name, so system fields never collide with user properties; _id is an ordinary property.
json_scalar_cmp
Compare JSON scalar values using the canonical integer/float ordering. Non-scalar values and mismatched domains return None.
json_type_name
Name of the JSON kind of a value ("null", "boolean", …).
normalize_name
Normalize a property name for lookup: ASCII-uppercase folds to lowercase, other alphanumerics are kept, and every other character becomes _.
scalar_cmp
Compare canonical scalars without converting large integers to f64. Mixed integer/float comparisons preserve the exact ordering represented by the IEEE-754 value; non-numeric or mismatched domains return None.
scalar_equal
Compare canonical scalars without widening integers through an imprecise floating-point representation. Integer/float equality is accepted only when the float is finite, integral, in range, and round-trips exactly.
scalar_to_json
Convert a canonical scalar to its JSON representation.