mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
refs issue #7929 add support for Postgres native uuid datatype
This commit is contained in:
parent
a530414a88
commit
66f3a7e487
2 changed files with 7 additions and 1 deletions
|
@ -68,7 +68,8 @@ class Postgres extends DboSource {
|
|||
'binary' => array('name' => 'bytea'),
|
||||
'boolean' => array('name' => 'boolean'),
|
||||
'number' => array('name' => 'numeric'),
|
||||
'inet' => array('name' => 'inet')
|
||||
'inet' => array('name' => 'inet'),
|
||||
'uuid' => array('name' => 'uuid')
|
||||
);
|
||||
|
||||
/**
|
||||
|
|
|
@ -345,6 +345,11 @@ class DboSource extends DataSource {
|
|||
case 'boolean':
|
||||
return $this->_connection->quote($this->boolean($data, true), PDO::PARAM_BOOL);
|
||||
case 'string':
|
||||
if ($data === '') {
|
||||
return 'NULL';
|
||||
} else {
|
||||
return $this->_connection->quote($data, PDO::PARAM_STR);
|
||||
}
|
||||
case 'text':
|
||||
return $this->_connection->quote($data, PDO::PARAM_STR);
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue