fix canocat for postgres, #32.

This commit is contained in:
Miroslav Šedivý 2021-11-01 17:06:51 +01:00
parent 1a72664f73
commit 45955a4730

View file

@ -25,10 +25,11 @@ class DB
}
// CONCAT() does not exist in SQLite, using || instead
// for postgres, ERROR: could not determine data type of parameter $1
public final static function concat(){
$values = func_get_args();
if(DB::connection() === 'sqlite') {
if(DB::connection() === 'sqlite' || DB::connection() === 'postgres') {
return implode(" || ", $values);
} else {
return 'CONCAT('.implode(", ", $values).')';