FluentMySQLSearch
class FluentMySQLSearch implements FluentSearchAdapter (View source)
Provides rewrite of fluent searches for MySQLDatabase
Warning: This class is extremely fragile, and sensitive to changes in {\MySQLDatabase::searchEngine} behaviour
Properties
Methods
Determine the where fragment containing a fulltext search condition
Extract keywords (both SQL and HTML encoded keywords) and boolean mode flag from the query
Detect and rewrite any full text search in this query
Rewrites the SELECT fragment of a query.
Rewrites the WHERE fragment of a query
Details
protected string|bool
getSearchFilter(SQLQuery $query)
Determine the where fragment containing a fulltext search condition
protected string
getClass(SQLQuery $query)
Determine the class this query is searching against
protected
getSearchParameters(string $class, string $searchfilter, string $keywords, string $keywordsHTML, bool $booleanMode)
Extract keywords (both SQL and HTML encoded keywords) and boolean mode flag from the query
augmentSearch(SQLQuery $query, DataQuery $dataQuery = null)
Detect and rewrite any full text search in this query
augmentSelect(string $class, array $translatedColumns, SQLQuery $query, string $keywords, string $keywordsHTML)
Rewrites the SELECT fragment of a query.
This is done in two stages:
- Augment queried columns
- Augment relevance column containing the MATCH
augmentFilter(string $class, array $translatedColumns, SQLQuery $query, string $keywords, string $keywordsHTML, $booleanMode)
Rewrites the WHERE fragment of a query