Fundamental data representation.
This module contains the types for representing data in Materialize that all layers of the stack can understand. Think of it as the lingua franca: individual layers may use different representations internally, but they all agree to use this representation at their boundaries.
pub use crate::global_id::GlobalId;
- Abstract data types.
- A re-useable vector of
Datumwith varying lifetimes.
- diff 🔒
- A set of traits for modeling things that can be explained by a SQL
- Provides fixed-length representations for data composed of
Datums of fixed-length types. These representations are aimed at being more efficient in memory usage than
Rowby relying on statically selected container lengths. Traits are provided that allow these representations to be made into instances of
Rowor created from
Rows. The traits are trivially implemented for
Rowitself, providing a uniform interface to describe
Rows or fixed-length containers standing in for them.
- Namespace constants to share between high- and low-levels of the system.
- relation 🔒
- row 🔒
- scalar 🔒
- Routines for converting datum values to and from their string representation.
- Custom Protobuf types for the
- The name of a column in a
- The type of a
- A sequence of Datums
- A mapping from string keys to Datums
- A re-useable vector of
Datumwith no particular lifetime.
- A borrowed allocation of
Datumwith a specific lifetime.
- Expression violated not-null constraint on named column
- A description of the shape of a relation.
- The type of a relation.
- A packed representation for
RowArenais used to hold on to temporary
Rows for functions like
evalthat need to create complex
Datums but don’t have a
Rowto put them in yet.
- Packs datums into a
- A wrapper around a byte slice that guarantees the data are row-formatted.
- A thread-local row, which can be borrowed and returned.
- System-wide timestamp type.
- Types that implement this trait can be stored in an SQL column with the specified ColumnType
FnOnce<T: DatumToPersist>() -> R
- A bridge between native Rust types and SQL runtime types represented in Datums
- Generate an arbitrary
- Number of bytes required by a list of datums. This computes the size that would be required if the given datums were packed into a list.
- Number of bytes required by the datum. This is used to optimistically pre-allocate buffers for packing rows.
- Number of bytes required by a sequence of datums.
- This returns true if we don’t care to keep stats for this column type (for now). We’ll have to remove this if/when we start actually using the schema’d part encoding.
- Return the number of bytes these Datums would use if packed as a Row.
- System-wide record count difference type.