-The query is built using the following grammar:
-.Bd -literal -offset indent
-<query> ::= "SELECT * FROM mpages WHERE" <condition>
-<condition> ::= "(" <condition> ")" |
- <condition> "OR" <condition> |
- <condition> "AND" <condition> |
- "desc" <operator> "?" |
- "id IN (SELECT pageid FROM" <subquery> ")"
-<subquery> ::= "names WHERE name" <operator> "?" |
- "keys WHERE key" <operator> "? AND bits & ?"
-<operator> ::= "MATCH" | "REGEXP"
-.Ed
-.Pp
-The MATCH and REGEXP operators are implemented by the functions
-.Fn sql_match
-and
-.Fn sql_regexp ,
-respectively.
-This is required because SQLite3 natively neither supports
-case-insensitive substring matching nor regular expression matching,
-but only string identity, shell globbing, and the weird home-brewed
-LIKE operator.
-.Pp