Skip to content

Commit

Permalink
Make filters case insensitive in PostgreSQL + Doctrine
Browse files Browse the repository at this point in the history
  • Loading branch information
karzac authored and f3l1x committed Apr 26, 2022
1 parent 8ef6786 commit 6a6af41
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/DataSource/DoctrineDataSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,10 @@ protected function applyFilterText(FilterText $filter): void

foreach ($words as $word) {
$exprs[] = $this->dataSource->expr()->like(
$c,
$this->dataSource->expr()->literal("%$word%")
$this->dataSource->expr()->lower($c),
$this->dataSource->expr()->lower(
$this->dataSource->expr()->literal("%$word%")
)
);
}
}
Expand Down

0 comments on commit 6a6af41

Please sign in to comment.