package granary
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=8b18780ea373be48301d9f333925860a2f9110fc0ac28684295118d72b65a67e
sha512=25ca3c9c5e2b528704a542502e0f37dc33ba003f65622d969b8c2b800778585f8ef0cf89b36e6679832e3993e8303aecddfc662742baf7044d6afe4a796b8f11
doc/granary.columnar/Granary_columnar/Persist/index.html
Module Granary_columnar.PersistSource
Persistence for columnar stores via the Store B-tree.
Each columnar table has an allocated Granary_store.Store.tree_id (stored in the catalog's Granary_catalog.Catalog.storage variant). The entire in-memory Col_store.t is serialised via Col_store.encode and stored as a single value under a well-known key within that tree. The B-tree overflow chain transparently handles values up to 1 GiB.
save tx tree_id store serialises store and writes it to the B-tree at tree_id under a reserved key. Must be called within a write transaction.
load tx tree_id schema reads a previously persisted columnar store from the B-tree at tree_id. Returns None if no data has been persisted yet (fresh table). Raises Failure on corrupt data. Works with both RO and RW transactions.