MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / test_pre_commit

Function test_pre_commit

crates/engine/src/relational_db.rs:2876–2885  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2874
2875 #[test]
2876 fn test_pre_commit() -> ResultTest<()> {
2877 let stdb = TestDB::durable()?;
2878
2879 let mut tx = begin_mut_tx(&stdb);
2880 let table_id = stdb.create_table(&mut tx, my_table(AlgebraicType::I32))?;
2881
2882 insert_three_i32s(&stdb, &mut tx, table_id)?;
2883 assert_eq!(collect_sorted::<i32>(&stdb, &tx, table_id)?, vec![-1, 0, 1]);
2884 Ok(())
2885 }
2886
2887 #[test]
2888 fn test_post_commit() -> ResultTest<()> {

Callers

nothing calls this directly

Calls 5

my_tableFunction · 0.85
insert_three_i32sFunction · 0.85
begin_mut_txFunction · 0.70
OkFunction · 0.50
create_tableMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…