rudb_common/lib.rs
1//! Types, values and errors. The bottom of the workspace.
2//!
3//! Rank 0 in the layer rule, which means everything can see this crate and this crate can see
4//! nothing. See `xtask/layers.toml` and `spec/18-package-layout.md`.
5//!
6//! What lives here is the vocabulary every other crate spells its signatures in. A type, a single
7//! value, an error and a span into the query text that produced it. Nothing here knows what a
8//! vector is, what a plan is or what a file is, and keeping it that way is what stops rank 0 from
9//! becoming a second name for the whole database.
10
11#![forbid(unsafe_code)]
12
13pub mod error;
14pub mod types;
15pub mod value;
16
17pub use error::{Error, ErrorCode, Result, Span};
18pub use types::{Field, LogicalType, MAX_DECIMAL_WIDTH, PhysicalType};
19pub use value::{Value, civil_from_days, days_from_civil};