Skip to main content

Crate rudb_common

Crate rudb_common 

Source
Expand description

Types, values and errors. The bottom of the workspace.

Rank 0 in the layer rule, which means everything can see this crate and this crate can see nothing. See xtask/layers.toml and spec/18-package-layout.md.

What lives here is the vocabulary every other crate spells its signatures in. A type, a single value, an error, a span into the query text that produced it, and the token that says a running query should stop. Nothing here knows what a vector is, what a plan is or what a file is, and keeping it that way is what stops rank 0 from becoming a second name for the whole database.

Cancel is here for the layer rule rather than because it is a kind of value. The thing that sets it is the embedding API at rank 13 and the thing that reads it is the executor at rank 12, so the only place both can see it from is the bottom. The slow counter is here for the same reason: the two things that increment it are at rank 1 and rank 3, the thing that reads it is at rank 4, and no two of those three can see each other. So is the stage clock, which is written at rank 5 by the Parquet reader and read at rank 4 by the same shim. So is Session, which is filled in at rank 13 by whatever ran SET and read at rank 12 by duckdb_settings().

Re-exports§

pub use bounds::Bound;
pub use bounds::Op;
pub use bounds::excluded;
pub use cancel::Cancel;
pub use error::Error;
pub use error::ErrorCode;
pub use error::Result;
pub use error::Span;
pub use memory::ALLOCATION;
pub use memory::Memory;
pub use memory::Reservation;
pub use memory::human;
pub use session::DefaultNullOrder;
pub use session::Semantics;
pub use session::Session;
pub use session::SessionTimeZone;
pub use session::ShowBehavior;
pub use slow::Cause;
pub use slow::Tally;
pub use stage::Spent;
pub use stage::Stage;
pub use types::Field;
pub use types::LogicalType;
pub use types::MAX_DECIMAL_WIDTH;
pub use types::PhysicalType;
pub use value::Value;
pub use value::civil_from_days;
pub use value::days_from_civil;
pub use value::interval_micros;

Modules§

bounds
What a minimum and a maximum can answer about a comparison, without looking at any rows.
cancel
Stopping a query that is already running.
error
The error model.
memory
How much memory a query is allowed to hold.
session
What a session has set, for the tables and functions that read a setting back.
slow
How many times this thread took a path written to be correct rather than fast.
stage
Where an operator’s time went, split by the phase inside it that spent it.
types
The type system, per spec/10-sql-and-types.md section 10.1.
utf8
Whether a run of bytes is text, answered in one pass.
value
Single values.