private function createQueryForColumn(ColumnConfiguration $column, $searchValue)
{
$searchType = $column->getSearch();
if ($searchType == DefaultSearchable::NONE()) {
// Don't do anything, this is not a searchable field
return $this->query;
} elseif ($searchType == DefaultSearchable::NORMAL()) {
$this->query->orWhere($column->getName(), 'LIKE', '%' . $searchValue . '%');
} elseif ($searchType == DefaultSearchable::REGEX()) {
$this->query->orWhere($column->getName(), 'REGEXP', $searchValue);
} else {
throw new DatatableException('An unsupported DefaultSearchable was provided.');
}
return $this->query;
}