Skip to main content

ValueKind

Type Alias ValueKind 

Source
pub type ValueKind = DataType;
Expand description

Alias kept for callers that prefer the registry’s own name. The on-disk tag space is owned by DataType; ValueKind reads better in registry contexts where the type name is the schema label rather than a parser concept.

Aliased Type§

#[repr(u8)]
pub enum ValueKind {
Show 55 variants Unknown = 0, Integer = 1, UnsignedInteger = 2, Float = 3, Text = 4, Blob = 5, Boolean = 6, Timestamp = 7, Duration = 8, IpAddr = 9, MacAddr = 10, Vector = 11, Nullable = 12, Json = 13, Uuid = 14, NodeRef = 15, EdgeRef = 16, VectorRef = 17, RowRef = 18, Color = 19, Email = 20, Url = 21, Phone = 22, Semver = 23, Cidr = 24, Date = 25, Time = 26, Decimal = 27, Enum = 28, Array = 29, TimestampMs = 30, Ipv4 = 31, Ipv6 = 32, Subnet = 33, Port = 34, Latitude = 35, Longitude = 36, GeoPoint = 37, Country2 = 38, Country3 = 39, Lang2 = 40, Lang5 = 41, Currency = 42, ColorAlpha = 43, BigInt = 44, KeyRef = 45, DocRef = 46, TableRef = 47, PageRef = 48, Secret = 49, Password = 50, TextZstd = 51, BlobZstd = 52, AssetCode = 53, Money = 54,
}

Variants§

§

Unknown = 0

Polymorphic / “any” placeholder. Used by function-catalog signatures (e.g. JSON_SET(json, path, value) where value accepts any scalar) so the resolver can skip concrete type checking for that argument. Never appears in stored schemas.

§

Integer = 1

Signed 64-bit integer

§

UnsignedInteger = 2

Unsigned 64-bit integer

§

Float = 3

64-bit floating point

§

Text = 4

Variable-length UTF-8 text

§

Blob = 5

Variable-length binary data

§

Boolean = 6

Boolean (true/false)

§

Timestamp = 7

Unix timestamp (seconds since epoch)

§

Duration = 8

Duration in milliseconds

§

IpAddr = 9

IPv4 or IPv6 address

§

MacAddr = 10

MAC address (6 bytes)

§

Vector = 11

Fixed-dimension float vector (for similarity search)

§

Nullable = 12

Nullable wrapper (stores inner type in high nibble)

§

Json = 13

JSON-like structured data

§

Uuid = 14

UUID (16 bytes)

§

NodeRef = 15

Reference to a graph node (for unified queries)

§

EdgeRef = 16

Reference to a graph edge

§

VectorRef = 17

Reference to a vector in vector store

§

RowRef = 18

Reference to a table row (table_id, row_id)

§

Color = 19

RGB color (3 bytes)

§

Email = 20

Email address (validated, stored lowercase)

§

Url = 21

URL (validated)

§

Phone = 22

Phone number (stored as u64 digits)

§

Semver = 23

Semantic version (packed u32: major1M + minor1K + patch)

§

Cidr = 24

CIDR notation (IPv4 u32 + prefix u8 = 5 bytes)

§

Date = 25

Date only (i32 days since Unix epoch, no time)

§

Time = 26

Time only (u32 milliseconds since midnight)

§

Decimal = 27

Fixed-point decimal (i64 with configurable precision)

§

Enum = 28

Enumerated type (u8 index into variant list)

§

Array = 29

Array of values (homogeneous)

§

TimestampMs = 30

Timestamp with millisecond precision (i64 ms since epoch)

§

Ipv4 = 31

IPv4 address (u32)

§

Ipv6 = 32

IPv6 address ([u8; 16])

§

Subnet = 33

Network subnet (ip u32 + mask u32)

§

Port = 34

TCP/UDP port number (u16)

§

Latitude = 35

Geographic latitude (i32 microdegrees)

§

Longitude = 36

Geographic longitude (i32 microdegrees)

§

GeoPoint = 37

Geographic point (lat i32 + lon i32)

§

Country2 = 38

ISO 3166-1 alpha-2 country code ([u8; 2])

§

Country3 = 39

ISO 3166-1 alpha-3 country code ([u8; 3])

§

Lang2 = 40

ISO 639-1 language code ([u8; 2])

§

Lang5 = 41

IETF language tag, e.g. “pt-BR” ([u8; 5])

§

Currency = 42

ISO 4217 currency code ([u8; 3])

§

ColorAlpha = 43

RGBA color with alpha ([u8; 4])

§

BigInt = 44

Signed 64-bit integer (alias for large numbers)

§

KeyRef = 45

Reference to a KV pair (collection, key string)

§

DocRef = 46

Reference to a document (collection, entity_id)

§

TableRef = 47

Reference to a table/collection by name

§

PageRef = 48

Reference to a physical storage page

§

Secret = 49

Encrypted secret (AES-256-GCM ciphertext, keyed by vault AES key)

§

Password = 50

Argon2id password hash

§

TextZstd = 51

C3 TOAST: zstd-compressed UTF-8 text (> TOAST_THRESHOLD bytes). In-memory representation is always Value::Text — compression is transparent to all callers above the serialization layer.

§

BlobZstd = 52

C3 TOAST: zstd-compressed binary blob (> TOAST_THRESHOLD bytes). In-memory representation is always Value::Blob.

§

AssetCode = 53

General asset code (fiat or crypto), validated and normalized uppercase text

§

Money = 54

Monetary amount represented as minor units + scale + asset code