clockworklabs/SpacetimeDB · error
datastore_clear() call failed
Error message
datastore_clear() call failed
What it means
Error "datastore_clear() call failed" thrown in clockworklabs/SpacetimeDB.
Source
Thrown at crates/bindings/src/table.rs:121
fn delete(&self, row: Self::Row) -> bool {
// Note that as of writing deletion is infallible, but future work may define new constraints,
// e.g. foreign keys, which cause deletion to fail in some cases.
// If and when these new constraints are added,
// we should define `Self::ForeignKeyViolation`,
// analogous to [`Self::UniqueConstraintViolation`].
let relation = std::slice::from_ref(&row);
let buf = IterBuf::serialize(relation).unwrap();
let count = sys::datastore_delete_all_by_eq_bsatn(Self::table_id(), &buf).unwrap();
count > 0
}
/// Clears the table of all rows.
///
/// Returns the number of rows that were deleted,
/// i.e., the value of [`self.count()`](Table::count) before this call.
fn clear(&self) -> u64 {
sys::datastore_clear(Self::table_id()).expect("datastore_clear() call failed")
}
// Re-integrates the BSATN of the `generated_cols` into `row`.
#[doc(hidden)]
fn integrate_generated_columns(row: &mut Self::Row, generated_cols: &[u8]);
}
#[doc(hidden)]
#[inline]
pub fn count<Tbl: Table>() -> u64 {
sys::datastore_table_row_count(Tbl::table_id()).expect("datastore_table_row_count() call failed")
}
#[doc(hidden)]
pub trait TableInternal: Sized {
const TABLE_NAME: &'static str;
const TABLE_ACCESS: TableAccess = TableAccess::Private;
const UNIQUE_COLUMNS: &'static [u16];View on GitHub (pinned to 524b4487d9)
When it happens
Trigger: Thrown at crates/bindings/src/table.rs:121 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of clockworklabs/SpacetimeDB@524b4487d9 (2026-08-16).
Data as JSON: /api/errors/7c36d4a3bb34619f.
Report an issue: GitHub.