MCPcopy Create free account
hub / github.com/TankHQ/tank / join_left_nested

Function join_left_nested

tests/join.rs:200–263  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

198
199 #[test]
200 fn join_left_nested() {
201 #[derive(Entity)]
202 #[tank(name = "another_table")]
203 struct Charlie {
204 _column: u128,
205 }
206
207 let join = join!((Charlie JOIN Alpha ON Charlie::_column < Alpha::_b) JOIN Bravo ON Alpha::_a == Bravo::_second);
208 assert!(matches!(
209 join,
210 Join {
211 join: JoinType::Default,
212 lhs: Join {
213 join: JoinType::Default,
214 lhs: TableRef {
215 name: Cow::Borrowed("another_table"),
216 ..
217 },
218 rhs: TableRef {
219 name: Cow::Borrowed("alpha"),
220 ..
221 },
222 on: Some(BinaryOp {
223 op: BinaryOpType::Less,
224 lhs: ColumnRef {
225 name: Cow::Borrowed("column"),
226 table: Cow::Borrowed("another_table"),
227 ..
228 },
229 rhs: ColumnRef {
230 name: Cow::Borrowed("b"),
231 table: Cow::Borrowed("alpha"),
232 ..
233 },
234 ..
235 }),
236 ..
237 },
238 rhs: TableRef {
239 name: Cow::Borrowed("bravo"),
240 ..
241 },
242 on: Some(BinaryOp {
243 op: BinaryOpType::Equal,
244 lhs: ColumnRef {
245 name: Cow::Borrowed("a"),
246 ..
247 },
248 rhs: ColumnRef {
249 name: Cow::Borrowed("second"),
250 ..
251 },
252 ..
253 }),
254 ..
255 }
256 ));
257 let mut query = DynQuery::default();

Callers

nothing calls this directly

Calls 1

write_queryMethod · 0.45

Tested by

no test coverage detected