Function spacetimedb_bindings_sys::iter
source · pub fn iter(
table_id: TableId,
filter: Option<&[u8]>
) -> Result<BufferIter, Errno>
Expand description
Returns an iterator for each row, as bytes, of a table identified by table_id
.
The rows can be put through an optional filter
,
which is encoded in the embedded language defined by spacetimedb_lib::filter::Expr
.
The actual return value is a handle to an iterator registered with the host environment,
but BufferIter
can be used directly as an Iterator
.
Returns an error if
- a table with the provided
table_id
doesn’t exist Some(filter)
doesn’t decode to a filter expression