Module mz_catalog::durable::objects
source · Expand description
The current types used to represent catalog data stored on disk. These objects generally fall into two categories.
The key-value objects are a one-to-one mapping of the protobuf objects used to save catalog
data durably. They can be converted to and from protobuf via the mz_proto::RustType
trait.
These objects should not be exposed anywhere outside the crate::durable
module.
The other type of objects combine the information from keys and values into a single struct,
but are still a direct representation of the data stored on disk. They can be converted to and
from the key-value objects via the DurableType
trait. These objects are used to pass
information to other modules in this crate and other catalog related code.
All non-catalog code should interact with the objects in crate::memory::objects
and never
directly interact with the objects in this module.
As an example, DatabaseKey
and DatabaseValue
are key-value objects, while Database
is the non-key-value counterpart.
Modules§
- This module is responsible for serializing catalog objects into Protobuf.
- This module contains various representations of a single catalog update and the logic necessary for converting between representations.
Structs§
- Token used to fence out other processes.
- A newtype wrapper for
CatalogItemId
that is only for the “introspection source index” namespace. - A newtype wrapper for
GlobalId
that is only for the “introspection source index” namespace. - A snapshot of the current on-disk state.
- This value is stored transparently, however, it should only ever be manipulated by the storage controller.
- A newtype wrapper for
CatalogItemId
that is only for the “system” namespace. - A newtype wrapper for
GlobalId
that is only for the “system” namespace. - Functions can share the same name as any other catalog item type within a given schema. For example, a function can have the same name as a type, e.g. ‘date’. As such, system objects are keyed in the catalog storage by the tuple (schema_name, object_type, object_name), which is guaranteed to be unique.
- This value is stored transparently, however, it should only ever be manipulated by the storage controller.
- This value is stored transparently, however, it should only ever be manipulated by the storage controller.
Enums§
Traits§
- A trait for representing
Self
as a key-value pair of type(Key, Value)
for the purpose of storing this value durably.