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

Function test_multi_column_two_ranges

crates/core/src/sql/execute.rs:1500–1514  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1498
1499 #[test]
1500 fn test_multi_column_two_ranges() -> ResultTest<()> {
1501 let db = TestDB::durable()?;
1502
1503 // Create table [test] with index on [a, b]
1504 let schema = &[("a", AlgebraicType::U8), ("b", AlgebraicType::U8)];
1505 let table_id = db.create_table_for_test_multi_column("test", schema, col_list![0, 1])?;
1506 let row = product![4u8, 8u8];
1507 with_auto_commit(&db, |tx| insert(&db, tx, table_id, &row.clone()).map(drop))?;
1508
1509 let result = run_for_testing(&db, "select * from test where a >= 3 and a <= 5 and b >= 3 and b <= 5")?;
1510
1511 assert!(result.is_empty());
1512
1513 Ok(())
1514 }
1515
1516 #[test]
1517 fn test_row_limit() -> ResultTest<()> {

Callers

nothing calls this directly

Calls 7

with_auto_commitFunction · 0.85
run_for_testingFunction · 0.85
insertFunction · 0.50
OkFunction · 0.50
mapMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…