Skip to content

Commit 027bb53

Browse files
committed
Remove raw sql when using regex and wrap the column name.
1 parent 326b254 commit 027bb53

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/QueryDataTable.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,6 @@ protected function resolveRelationColumn($column)
413413
protected function compileColumnSearch($i, $column, $keyword)
414414
{
415415
if ($this->request->isRegex($i)) {
416-
$column = strstr($column, '(') ? $this->connection->raw($column) : $column;
417416
$this->regexColumnSearch($column, $keyword);
418417
} else {
419418
$this->compileQuerySearch($this->query, $column, $keyword, '');
@@ -428,6 +427,8 @@ protected function compileColumnSearch($i, $column, $keyword)
428427
*/
429428
protected function regexColumnSearch($column, $keyword)
430429
{
430+
$column = $this->wrap($column);
431+
431432
switch ($this->connection->getDriverName()) {
432433
case 'oracle':
433434
$sql = ! $this->config->isCaseInsensitive()

0 commit comments

Comments
 (0)