Helper function to assert row count
| 99 | |
| 100 | // Helper function to assert row count |
| 101 | void assert_row_count(ProcedureContext& ctx, uint64_t count) { |
| 102 | ctx.with_tx([count](TxContext& tx) { |
| 103 | uint64_t actual = tx.db[my_table].count(); |
| 104 | if (actual != count) { |
| 105 | LOG_PANIC("Expected " + std::to_string(count) + " rows but got " + std::to_string(actual)); |
| 106 | } |
| 107 | }); |
| 108 | } |
| 109 | |
| 110 | // Test transaction that commits |
| 111 | SPACETIMEDB_PROCEDURE(Unit, insert_with_tx_commit, ProcedureContext ctx) { |
no test coverage detected
searching dependent graphs…