Browse Source

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

master
Tom Lingham 9 years ago
parent
commit
ed432fbc50
  1. 7
      src/SearchDrivers/BaseSearchDriver.php

7
src/SearchDrivers/BaseSearchDriver.php

@ -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, '')";
}
}
Loading…
Cancel
Save