#[non_exhaustive]pub enum Value {
}Expand description
A row-cell value, including SQL NULL. Float uses f64; NaN compares
non-equal to itself (PG behaviour) — PartialEq is derived so callers
must opt into NaN-aware comparison if they need stronger guarantees.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
SmallInt(i16)
Int(i32)
BigInt(i64)
Float(f64)
Text(String)
Bool(bool)
Vector(Vec<f32>)
Sq8Vector(Sq8Vector)
v6.0.1: 8-bit scalar-quantised vector cell. Lives in
columns declared VECTOR(N) USING SQ8. Layout per cell:
Sq8Vector { min: f32, max: f32, bytes: Vec<u8> } —
4× compression vs Vector(Vec<f32>). The wire layer
dequantises to f32 on SELECT; INSERT path quantises
incoming Vector(Vec<f32>) cells into this variant.
HalfVector(HalfVector)
v6.0.3: IEEE-754 binary16 vector cell. Lives in columns
declared VECTOR(N) USING HALF. Stores raw u16 LE bits
(2× compression vs Vector(Vec<f32>)). Wire / display
paths dequantise to f32 bit-exactly; INSERT path converts
incoming f32 vectors at the engine boundary.
Numeric
Exact fixed-point decimal. scaled holds the value as
actual * 10^scale so the storage type is always integral —
arithmetic never falls back to floating-point.
Date(i32)
Days since the Unix epoch (1970-01-01). Negative for earlier dates.
Timestamp(i64)
Microseconds since the Unix epoch (1970-01-01T00:00:00Z).
Interval
Calendar span: months (variable-length) + micros (fixed-length).
Runtime-only — cannot appear in a stored row in v2.11.
Json(String)
v4.9 JSON — raw JSON text. No structural validation
happens at the storage layer; whatever the parser hands us
round-trips verbatim. Equality is byte-wise.