mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-10 02:14:31 +02:00
Added a custom function to make PostgresSQL searches case insensitive
This is required only for postgres as every other database is case invariant by default. But to achieve a portable way, we implement it via a custom DQL function. This fixes issue #784
This commit is contained in:
parent
b1ba26e0b9
commit
e223078af9
11 changed files with 94 additions and 22 deletions
|
@ -66,7 +66,7 @@ class TagFinder
|
|||
|
||||
$qb->select('p.tags')
|
||||
->from(Part::class, 'p')
|
||||
->where('p.tags LIKE ?1')
|
||||
->where('ILIKE(p.tags, ?1) = TRUE')
|
||||
->setMaxResults($options['query_limit'])
|
||||
//->orderBy('RAND()')
|
||||
->setParameter(1, '%'.$keyword.'%');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue