Skip to main content

Module store

Module store 

Available on crate features tokio and turso only.
Expand description

Runtime turso store with a connection and the prepared statements that flush ops and rebuild the session.

StructsΒ§

FilterColumns πŸ”’
The filter-table column values for a FilterState, with NULL in the columns that the state does not use. A pending request stores the subscription it replaces in the restore_* columns.
Selects πŸ”’
The prepared SELECT statements used by TursoStore::load.
Statements πŸ”’
The mutating statements, prepared once and reused on every flush.
TursoStore πŸ”’
A turso-backed session store.

EnumsΒ§

Flush πŸ”’
How TursoStore::flush writes its ops.

FunctionsΒ§

apply_packet_id_rows πŸ”’
Runs a no-parameter query whose rows each contain one packet id, applying ctor(packet_id) to session for every row. The pubrel and incoming-QoS-2 restore queries use this.
assert_persist_future_send πŸ”’
Compile-time guard that TursoStore::persist returns a Send future.
decode_filter_state πŸ”’
Decodes a filter row’s columns (indices 1..=6) back into a FilterState.
exec_pid πŸ”’
Executes a prepared statement whose only bind parameter is a packet identifier, as in every insert/delete keyed by one packet id.
filter_columns πŸ”’
Maps a FilterState onto the filter-table columns.
prepare πŸ”’
row_options πŸ”’
row_restore πŸ”’
Reads the restore_* columns (indices 5 and 6) of a filter row.
row_spec πŸ”’
Reads the subscription stored in the columns idx and idx + 1.
spec_values πŸ”’
The (options, subscription_id) column values for spec.