protected function getWordExpression(SelectQuery $query, $token)
{
if ($this->configuration['enableWildcards'] && $token[0] === '*') {
return $query->expr->like($this->dbHandler->quoteColumn('word'), $query->bindValue('%' . substr($token, 1)));
}
if ($this->configuration['enableWildcards'] && $token[strlen($token) - 1] === '*') {
return $query->expr->like($this->dbHandler->quoteColumn('word'), $query->bindValue(substr($token, 0, -1) . '%'));
}
return $query->expr->eq($this->dbHandler->quoteColumn('word'), $query->bindValue($token));
}