MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / at_at_with_plainto_tsquery

Function at_at_with_plainto_tsquery

nodedb-sql/src/resolver/expr/tests.rs:427–444  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

425
426#[test]
427fn 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]
447fn tsvector_cast_elided() {

Callers

nothing calls this directly

Calls 1

where_fnFunction · 0.85

Tested by

no test coverage detected