case-insensitive message search for postgres
This commit is contained in:
parent
0c45cf17b2
commit
c813700d98
1 changed files with 7 additions and 1 deletions
|
@ -112,7 +112,13 @@ class MessageColumn extends Column
|
|||
|
||||
public function get_sql_filter(): string
|
||||
{
|
||||
return "({$this->name} LIKE :{$this->name}_0 AND priority >= :{$this->name}_1)";
|
||||
$driver = $this->table->db->getAttribute(\PDO::ATTR_DRIVER_NAME);
|
||||
switch ($driver) {
|
||||
case "pgsql":
|
||||
return "(LOWER({$this->name}) LIKE LOWER(:{$this->name}_0) AND priority >= :{$this->name}_1)";
|
||||
default:
|
||||
return "({$this->name} LIKE :{$this->name}_0 AND priority >= :{$this->name}_1)";
|
||||
}
|
||||
}
|
||||
|
||||
public function read_input(array $inputs)
|
||||
|
|
Reference in a new issue