case-insensitive message search for postgres

This commit is contained in:
Shish 2023-06-28 13:02:20 +00:00
parent 0c45cf17b2
commit c813700d98

View file

@ -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)