Crate spacetimedb_table
source ·Expand description
The spacetimedb_table crate provides a Table implementation
and various ways to interact with a table.
Modules§
- Provides the function [
read_row_from_page(ser, page, fixed_offset, ty)] which serializesvalue = page.get_row_data(fixed_offset, fixed_row_size)typed attyand associated var len objects invalueinto the serializerser. - Provides the functions [
write_row_to_pages(pages, blob_store, ty, val)] and [write_row_to_page(page, blob_store, visitor, ty, val)] which writeval: ProductValuetyped attytopageandpagesrespectively. - Provides the interface
BlobStorethat tables use to talk to a blob store engine for large var-len objects. - Provides the function [
eq_row_in_page(page_a, page_b, offset_a, offset_b, ty)] which, forvalue_a/b = page_a/b.get_row_data(offset_a/b, fixed_row_size)typed atty, comparesvalue_aandvalue_bfor equality. - Provides primitive types and definitions around bytes, row hashes, (page) sizes, offsets, and indices.
- Defines
Layout, which encompasses the fixed size and alignment of an object, e.g., a row, or a column, or some other sub-division of a row. - Provides a
Pageabstraction that stores rows and an associated header necessary for the page to work. Consult the documentation of this type for a list of operations and a description of how page work. - Provides
PointerMapthat deals with the association of aRowHashto aRowPointerthrough operationsinsertanddelete. - Provides a trait
ReadColumnfor extracting a single column from acrate::table::RowRef. This is desirable as frequently, e.g. when evaluating filtered queries, we are interested in only a single column (or a small set of columns), and would like to avoid the allocation required by aProductValue. - Provides the function [
hash_row_in_page(hasher, page, fixed_offset, ty)] which hashesvalue = page.get_row_data(fixed_offset, fixed_row_size)typed attyand associated var len objects invalueintohasher. - A
VarLenMembersvisitor for [AlgebraicType], supporting any non-recursiveAlgebraicType, including sums and products.
Macros§
- Asserts that
$tyis aligned at$alignbytes instatic_assert_align($ty, $align). - Asserts that
$tyis$sizebytes instatic_assert_size($ty, $size).