()
| 510 | /// Test a query that uses a multi-column index |
| 511 | #[tokio::test] |
| 512 | async fn test_multi_column_index() -> anyhow::Result<()> { |
| 513 | let db = TestDB::in_memory()?; |
| 514 | |
| 515 | let schema = [ |
| 516 | ("a", AlgebraicType::U64), |
| 517 | ("b", AlgebraicType::U64), |
| 518 | ("c", AlgebraicType::U64), |
| 519 | ]; |
| 520 | |
| 521 | let table_id = db.create_table_for_test_multi_column("t", &schema, [1, 2].into())?; |
| 522 | |
| 523 | insert_rows( |
| 524 | &db, |
| 525 | table_id, |
| 526 | vec![ |
| 527 | product![0_u64, 1_u64, 2_u64], |
| 528 | product![1_u64, 2_u64, 1_u64], |
| 529 | product![2_u64, 2_u64, 2_u64], |
| 530 | ], |
| 531 | )?; |
| 532 | |
| 533 | assert_query_results( |
| 534 | db.clone(), |
| 535 | "select * from t where c = 1 and b = 2", |
| 536 | AuthCtx::for_testing(), |
| 537 | [product![1_u64, 2_u64, 1_u64]], |
| 538 | ) |
| 539 | .await; |
| 540 | |
| 541 | Ok(()) |
| 542 | } |
| 543 | |
| 544 | /// Test querying a table with RLS rules |
| 545 | #[tokio::test] |
nothing calls this directly
no test coverage detected
searching dependent graphs…