()
| 375 | |
| 376 | #[test] |
| 377 | fn chained_arrow_lowers_nested() { |
| 378 | // data->'a'->'b' → pg_json_get(pg_json_get(data, 'a'), 'b') |
| 379 | let expr = select_expr_lowered("SELECT data->'a'->'b' FROM t"); |
| 380 | match expr { |
| 381 | SqlExpr::Function { name, ref args, .. } => { |
| 382 | assert_eq!(name, "pg_json_get", "outer fn should be pg_json_get"); |
| 383 | match &args[0] { |
| 384 | SqlExpr::Function { |
| 385 | name: inner_name, .. |
| 386 | } => { |
| 387 | assert_eq!(inner_name, "pg_json_get", "inner fn should be pg_json_get"); |
| 388 | } |
| 389 | other => panic!("expected inner pg_json_get, got {other:?}"), |
| 390 | } |
| 391 | } |
| 392 | other => panic!("expected outer pg_json_get, got {other:?}"), |
| 393 | } |
| 394 | } |
| 395 | |
| 396 | // ── FTS operator / function lowering tests ──────────────────────────────── |
| 397 |
nothing calls this directly
no test coverage detected