Function spacetimedb_bindings_sys::iter_by_col_eq
source · pub fn iter_by_col_eq(
table_id: TableId,
col_id: ColId,
val: &[u8]
) -> Result<Buffer, Errno>
Expand description
Finds all rows in the table identified by table_id
,
where the row has a column, identified by col_id
,
with data matching the byte string val
.
Matching is defined BSATN-decoding val
to an AlgebraicValue
according to the column’s schema and then Ord for AlgebraicValue
.
The rows found are BSATN encoded and then concatenated.
The resulting byte string from the concatenation is written
to a fresh buffer with a handle to it returned as a Buffer
.
Returns an error if
- a table with the provided
table_id
doesn’t exist col_id
does not identify a column of the tableval
cannot be BSATN-decoded to anAlgebraicValue
typed at theAlgebraicType
of the column