()
| 425 | |
| 426 | #[test] |
| 427 | fn at_at_with_plainto_tsquery() { |
| 428 | // col @@ plainto_tsquery('rust lang') → pg_fts_match(col, pg_plainto_tsquery(...)) |
| 429 | let expr = where_fn("SELECT * FROM t WHERE body @@ plainto_tsquery('rust lang')"); |
| 430 | match expr { |
| 431 | SqlExpr::Function { |
| 432 | ref name, ref args, .. |
| 433 | } => { |
| 434 | assert_eq!(name, "pg_fts_match"); |
| 435 | match &args[1] { |
| 436 | SqlExpr::Function { name: inner, .. } => { |
| 437 | assert_eq!(inner, "pg_plainto_tsquery"); |
| 438 | } |
| 439 | other => panic!("expected pg_plainto_tsquery, got {other:?}"), |
| 440 | } |
| 441 | } |
| 442 | other => panic!("expected pg_fts_match, got {other:?}"), |
| 443 | } |
| 444 | } |
| 445 | |
| 446 | #[test] |
| 447 | fn tsvector_cast_elided() { |
nothing calls this directly
no test coverage detected