Expand description
Shared search-query expression helpers.
The helpers in this module build small SeaQuery expressions for common
search behavior used by Aster repositories: escaped LIKE patterns,
case-insensitive substring checks, SQLite FTS phrase queries, and MySQL
boolean-mode phrase queries. They do not depend on product entities and leave
database-specific query composition to the caller.
Functionsยง
- escape_
like_ query - Escapes the escape character itself and the wildcard characters for SQL
LIKEqueries. - lower_
like_ condition - Builds a case-insensitive
LIKE '%query%'condition for a column. - mysql_
boolean_ mode_ query - Builds a quoted MySQL boolean-mode phrase query when the input is safe.
- sqlite_
fts_ match_ condition - Builds a SQLite FTS subquery condition matching row ids from an FTS table.
- sqlite_
match_ query - Builds a quoted SQLite FTS phrase query when the input is long enough.