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 serializes value = page.get_row_data(fixed_offset, fixed_row_size) typed at ty and associated var len objects in value into the serializer ser.
  • Provides the functions [write_row_to_pages(pages, blob_store, ty, val)] and [write_row_to_page(page, blob_store, visitor, ty, val)] which write val: ProductValue typed at ty to page and pages respectively.
  • This module implements a fast path for serializing certain types from BFLATN to BSATN.
  • Provides the interface BlobStore that tables use to talk to a blob store engine for large var-len objects.
  • BTree indexes with specialized key types.
  • Provides the function [eq_row_in_page(page_a, page_b, offset_a, offset_b, ty)] which, for value_a/b = page_a/b.get_row_data(offset_a/b, fixed_row_size) typed at ty, compares value_a and value_b for 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 Page abstraction 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 Pages, a page manager dealing with Pages as a collection.
  • Provides PointerMap that deals with the association of a RowHash to a RowPointer through operations insert and delete.
  • Provides a trait ReadColumn for extracting a single column from a crate::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 a ProductValue.
  • Provides the function [hash_row_in_page(hasher, page, fixed_offset, ty)] which hashes value = page.get_row_data(fixed_offset, fixed_row_size) typed at ty and associated var len objects in value into hasher.
  • A VarLenMembers visitor for [AlgebraicType], supporting any non-recursive AlgebraicType, including sums and products.
  • Provides the definitions of VarLenRef, VarLenGranule, and VarLenMembers.

Macros§