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

Function parse_nested

nodedb-sql/src/functions/fts_ops/tsquery_parser.rs:241–263  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

239
240 #[test]
241 fn parse_nested() {
242 // (a & b) | c
243 let q = parse_tsquery("(a & b) | c").unwrap();
244 assert_eq!(
245 q,
246 FtsQuery::Or(vec![
247 FtsQuery::And(vec![
248 FtsQuery::Plain {
249 text: "a".into(),
250 fuzzy: false
251 },
252 FtsQuery::Plain {
253 text: "b".into(),
254 fuzzy: false
255 },
256 ]),
257 FtsQuery::Plain {
258 text: "c".into(),
259 fuzzy: false
260 },
261 ])
262 );
263 }
264
265 #[test]
266 fn parse_not_term() {

Callers

nothing calls this directly

Calls 1

parse_tsqueryFunction · 0.85

Tested by

no test coverage detected