Expand description
The spacetimedb_table crate provides a Table implementation
and various ways to interact with a table.
Modules§
- bflatn_
from - 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. - bflatn_
to - 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. - blob_
store - Provides the interface
BlobStorethat tables use to talk to a blob store engine for large var-len objects. - eq
- 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. - fixed_
bit_ set - indexes
- Provides primitive types and definitions around bytes, row hashes, (page) sizes, offsets, and indices.
- page
- 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. - page_
pool - pages
- Provides
Pages, a page manager dealing withPages as a collection. - pointer_
map - Provides
PointerMapthat deals with the association of aRowHashto aRowPointerthrough operationsinsertanddelete. - read_
column - 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. - row_
hash - 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. - row_
type_ visitor - A
VarLenMembersvisitor for [AlgebraicType], supporting any non-recursiveAlgebraicType, including sums and products. - static_
bsatn_ validator - To efficiently implement a fast-path BSATN -> BFLATN,
we use a
StaticLayoutbut in reverse of the read path. This however leaves us with no way to validate that the BSATN satisfies the row type of a given table. - static_
layout - This module implements a fast path for converting certain row types between BFLATN <-> BSATN.
- table
- table_
index - Table indexes with specialized key types.
- var_len
- Provides the definitions of
VarLenRef,VarLenGranule, andVarLenMembers.
Macros§
- static_
assert_ align - Asserts that
$tyis aligned at$alignbytes instatic_assert_align($ty, $align). - static_
assert_ size - Asserts that
$tyis$sizebytes instatic_assert_size($ty, $size).