Granary_sql.Fts_querySourceFTS query string parser.
Parses a MATCH query string into a structured query tree.
Syntax:
term OR term → OR-term or NOT term → NOT (negation — must be combined with a positive term)"term1 term2" → phrase (terms must appear consecutively in same column)term* → prefix searchAll terms are lowercased before matching.
Parse a raw MATCH query string. Returns Error msg on malformed input.
Collect all positive (non-negated) terms from a query, for posting-list lookups.
Pretty-print a query tree in a parenthesised AND/OR/NOT form.