Coalesce NULL fields to empty string for the purposes of running the search. Fixed #23

This commit is contained in:
Tom Lingham
2016-05-14 11:31:15 +10:00
parent efb1b63e17
commit ed432fbc50

View File

@ -193,6 +193,11 @@ abstract class BaseSearchDriver implements SearchDriverInterface
{
$matcher = new $matcherClass($multiplier);
return $matcher->buildQueryString($searchField, $this->searchString);
return $matcher->buildQueryString($this->coalesce($searchField), $this->searchString);
}
private function coalesce($field)
{
return "COALESCE($field, '')";
}
}