Skip to main content

reddb_types/
lib.rs

1//! `reddb-io-types` — the neutral keystone crate for RedDB's logical type
2//! system (ADR 0052).
3//!
4//! This crate sits at the **bottom of the workspace crate graph**: every
5//! authority crate (`reddb-io-file`, `reddb-io-wire`, the planned
6//! `reddb-io-rql` and `reddb-io-crypto`) may depend on it, but it depends on
7//! **no other workspace crate**. It owns the core type vocabulary —
8//! [`Value`], [`DataType`], [`SqlTypeName`], [`TypeModifier`],
9//! [`TypeCategory`], [`ValueError`], and [`Row`] — together with the
10//! [`value_codec`] serialization that `Value::to_bytes`/`from_bytes` delegate
11//! to.
12//!
13//! The `reddb-server` `storage::schema` module keeps a re-export shim so the
14//! ~180 existing call-sites across the workspace stay untouched.
15
16// The byte-faithful re-home (ADR 0052) preserves `types`/`value_codec`
17// exactly as they were authored under the server's crate-level
18// `#![allow(unused_imports)]`. `types.rs` keeps `std::net::{Ipv4Addr,
19// Ipv6Addr}` in its module-level `use` even though the non-test paths
20// reference them fully-qualified and the test module re-imports them
21// locally; carrying the allow here keeps the move a pure relocation.
22#![allow(unused_imports)]
23
24pub mod canonical_key;
25pub mod cast_catalog;
26pub mod catalog;
27pub mod coerce;
28pub mod coercion_spine;
29mod conversions;
30pub mod distance;
31pub mod duration;
32pub mod function_catalog;
33pub mod index_hint;
34pub mod json;
35pub mod operator;
36pub mod operator_catalog;
37pub mod parametric;
38pub mod polymorphic;
39pub mod queue_mode;
40pub mod serde_json;
41pub mod types;
42pub mod utils;
43pub mod value_codec;
44pub mod value_compare;
45pub mod vector_metadata;
46
47pub use canonical_key::{value_to_canonical_key, CanonicalKey, CanonicalKeyFamily};
48pub use operator::BinOp;
49pub use types::{DataType, Row, SqlTypeName, TypeCategory, TypeModifier, Value, ValueError};