mirror of
https://github.com/silverstripe/silverstripe-postgresql
synced 2024-10-22 17:05:45 +02:00
Merge branch '2'
This commit is contained in:
commit
1b55ffaaf6
@ -81,9 +81,15 @@ class PostgreSQLQuery extends Query
|
|||||||
$record[$k] = $v;
|
$record[$k] = $v;
|
||||||
$type = pg_field_type($this->handle, $i);
|
$type = pg_field_type($this->handle, $i);
|
||||||
if (isset(self::$typeMapping[$type])) {
|
if (isset(self::$typeMapping[$type])) {
|
||||||
|
if ($type === 'bool' && $record[$k] === 't') {
|
||||||
|
$record[$k] = 1;
|
||||||
|
|
||||||
|
// Note that boolean 'f' will be converted to 0 by this
|
||||||
|
} else {
|
||||||
settype($record[$k], self::$typeMapping[$type]);
|
settype($record[$k], self::$typeMapping[$type]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $record;
|
return $record;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user