Storine v0.3.0

Reference

Values

Every Storine value type, how each client represents it, how the console and SQL write it, and how it is encoded on the wire.

Types#

TypeRangeWire tag
null0x00
bool0x01
int6464-bit signed0x02
uint6464-bit unsigned0x03
float64IEEE 754 double0x04
int128128-bit signed0x05
timestampnanoseconds since 1970-01-01T00:00:00Z, signed 64-bit0x06
uuid16 bytes, RFC 4122 order0x07
id24 opaque bytes0x08
textUTF-80x09
bytesraw bytes0x0A
decimal128-bit mantissa and a scale of 0 to 38: the value is mantissa / 10^scale0x0B
listvalues in order0x0C
maptext keys, unique, in byte order0x0D

Lists and maps nest up to 32 levels. Field names in a document must not be empty and must not contain a dot. The byte encoding of each type is in the wire protocol, section 4.

In each client#

TypePythonTypeScriptGoJavaC#RustPHPRuby
nullNonenullnilnullnullValue::Nullnullnil
boolboolbooleanboolBooleanboolValue::Boolbooltrue, false
int64intnumber up to 2^53, else bigintint64LonglongValue::IntintInteger
uint64storine.UInt64bigintuint64UInt64ulongValue::UIntUInt64Storine::UInt64
int128intbigint*big.IntBigIntegerBigInteger, Int128Value::Int128Int128Integer
float64floatnumber (float(5) forces a float)float64DoubledoubleValue::FloatfloatFloat
decimaldecimal.DecimalDecimalstorine.DecimalBigDecimaldecimal, or BigDecimal beyond 28 digitsDecimal (dec("19.99"))Storine\DecimalStorine::Decimal (accepts BigDecimal)
timestampdatetime (naive is taken as UTC)Datetime.TimeInstantDateTime, DateTimeOffset, TimestampValue::Timestamp, from SystemTimeDateTimeInterface, TimestampTime
uuiduuid.UUIDUuidstorine.UUIDUUIDGuidValue::UuidUuidStorine::Uuid
idstorine.IdValue::IdIdStorine::Id
textstrstringstringStringstringValue::TextstringString
bytesbytesUint8Array[]bytebyte[]byte[]Value::BytesBytesbinary String ("\x00".b)
listlistarraysslicescollections, arrayslists, arraysValue::List (list![...])arrays with keys 0..n-1Array
mapdictplain objectsmap[string]T, storine.DocMap<String, ?>Doc, dictionariesValue::Map (doc!{...})other arrays, stdClassHash

Decimals keep their scale: Decimal("1.50") comes back as 1.50, not 1.5. Each client's page has the details, such as how PHP tells an empty list from an empty map.

In JSON: the console#

The console shows and edits documents as JSON, so types that JSON lacks are written as one-key objects:

TypeJSON form
decimal{"$decimal": "9.99"}
timestamp{"$time": "2026-11-13T08:00:00Z"}
bytes{"$bytes": "<base64>"}
uuid{"$uuid": "6f1c2a7e-4b1d-4c2e-9a51-0e8f3b7d9c11"}
id{"$id": "<48 hex digits>"}
integer beyond 2^53{"$int": "123456789012345678901"}
NaN and infinities{"$float": "NaN"}, {"$float": "Infinity"}, {"$float": "-Infinity"}

A bare 1 is an integer and 1.0 a float. How SQL column types map to these values is in the SQL gateway's SQL support.

Comparison and order#

Numbers of every kind compare by value: 1, 1.0 and 1.00 are equal in filters and in group keys. Ordered comparisons match only values of the same kind. Sorting uses one total order across kinds:

null < bool < numbers < timestamps < text < bytes < uuid < id < list < map

with ties broken by document key.