Function spacetimedb_bindings_sys::delete_by_rel
source · pub fn delete_by_rel(table_id: TableId, relation: &[u8]) -> Result<u32, Errno>
Expand description
Deletes those rows, in the table identified by table_id
,
that match any row in relation
.
Matching is defined by first BSATN-decoding
the byte string pointed to at by relation
to a Vec<ProductValue>
according to the row schema of the table
and then using Ord for AlgebraicValue
.
Returns the number of rows deleted.
Returns an error if
- a table with the provided
table_id
doesn’t exist (relation, relation_len)
doesn’t decode from BSATN to aVec<ProductValue>