Function spacetimedb_bindings_sys::delete_by_col_eq

source ·
pub fn delete_by_col_eq(
    table_id: TableId,
    col_id: ColId,
    value: &[u8]
) -> Result<u32, Errno>
Expand description

Deletes all rows in the table identified by table_id where the column identified by col_id matches value.

Matching is defined by BSATN-decoding value to an AlgebraicValue according to the column’s schema and then Ord for AlgebraicValue.

Returns the number of rows deleted.

Returns an error if

  • a table with the provided table_id doesn’t exist
  • no columns were deleted
  • col_id does not identify a column of the table