{"record":{"id":"3b5b030b002fa4c0","repo":"clockworklabs/SpacetimeDB","slug":"datastore-table-row-count-call-failed","errorCode":null,"errorMessage":"datastore_table_row_count() call failed","messagePattern":"datastore_table_row_count\\(\\) call failed","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/bindings/src/table.rs","lineNumber":132,"sourceCode":"    }\n\n    /// Clears the table of all rows.\n    ///\n    /// Returns the number of rows that were deleted,\n    /// i.e., the value of [`self.count()`](Table::count) before this call.\n    fn clear(&self) -> u64 {\n        sys::datastore_clear(Self::table_id()).expect(\"datastore_clear() call failed\")\n    }\n\n    // Re-integrates the BSATN of the `generated_cols` into `row`.\n    #[doc(hidden)]\n    fn integrate_generated_columns(row: &mut Self::Row, generated_cols: &[u8]);\n}\n\n#[doc(hidden)]\n#[inline]\npub fn count<Tbl: Table>() -> u64 {\n    sys::datastore_table_row_count(Tbl::table_id()).expect(\"datastore_table_row_count() call failed\")\n}\n\n#[doc(hidden)]\npub trait TableInternal: Sized {\n    const TABLE_NAME: &'static str;\n    const TABLE_ACCESS: TableAccess = TableAccess::Private;\n    const UNIQUE_COLUMNS: &'static [u16];\n    const INDEXES: &'static [IndexDesc<'static>];\n    const PRIMARY_KEY: Option<u16> = None;\n    const SEQUENCES: &'static [u16];\n    const SCHEDULE: Option<ScheduleDesc<'static>> = None;\n    const IS_EVENT: bool = false;\n\n    /// Returns the ID of this table.\n    fn table_id() -> TableId;\n\n    fn get_default_col_values() -> Vec<ColumnDefault>;\n}","sourceCodeStart":114,"sourceCodeEnd":150,"githubUrl":"https://github.com/clockworklabs/SpacetimeDB/blob/524b4487d949b61a07d4f39c862d1290259dfd20/crates/bindings/src/table.rs#L114-L150","documentation":"Error \"datastore_table_row_count() call failed\" thrown in clockworklabs/SpacetimeDB.","triggerScenarios":"Thrown at crates/bindings/src/table.rs:132 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"524b4487d949b61a07d4f39c862d1290259dfd20","analyzedAt":"2026-08-16T23:58:54.611Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}