()
| 896 | /// Test projecting columns from both tables in join |
| 897 | #[tokio::test] |
| 898 | async fn test_project_join() -> anyhow::Result<()> { |
| 899 | let db = TestDB::in_memory()?; |
| 900 | |
| 901 | let t_schema = [("id", AlgebraicType::U8), ("x", AlgebraicType::U8)]; |
| 902 | let s_schema = [("id", AlgebraicType::U8), ("y", AlgebraicType::U8)]; |
| 903 | |
| 904 | let t_id = db.create_table_for_test("t", &t_schema, &[0.into()])?; |
| 905 | let s_id = db.create_table_for_test("s", &s_schema, &[0.into()])?; |
| 906 | |
| 907 | insert_rows(&db, t_id, [product![1_u8, 2_u8]])?; |
| 908 | insert_rows(&db, s_id, [product![1_u8, 3_u8]])?; |
| 909 | |
| 910 | let id = identity_from_u8(1); |
| 911 | let auth = AuthCtx::new(Identity::ZERO, id); |
| 912 | |
| 913 | assert_query_results( |
| 914 | db.clone(), |
| 915 | "select t.x, s.y from t join s on t.id = s.id", |
| 916 | auth, |
| 917 | [product![2_u8, 3_u8]], |
| 918 | ) |
| 919 | .await; |
| 920 | |
| 921 | Ok(()) |
| 922 | } |
| 923 | |
| 924 | #[tokio::test] |
| 925 | async fn test_view() -> anyhow::Result<()> { |
nothing calls this directly
no test coverage detected
searching dependent graphs…