mirror of
https://github.com/dg/dibi.git
synced 2025-08-08 07:06:52 +02:00
enabled 'unsigned' option on mysql and mysqli column info
This commit is contained in:
@@ -476,6 +476,7 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver
|
|||||||
'table' => $table,
|
'table' => $table,
|
||||||
'nativetype' => strtoupper($type[0]),
|
'nativetype' => strtoupper($type[0]),
|
||||||
'size' => isset($type[1]) ? (int) $type[1] : NULL,
|
'size' => isset($type[1]) ? (int) $type[1] : NULL,
|
||||||
|
'unsigned' => (bool) strstr('unsigned', $row['Type']),
|
||||||
'nullable' => $row['Null'] === 'YES',
|
'nullable' => $row['Null'] === 'YES',
|
||||||
'default' => $row['Default'],
|
'default' => $row['Default'],
|
||||||
'autoincrement' => $row['Extra'] === 'auto_increment',
|
'autoincrement' => $row['Extra'] === 'auto_increment',
|
||||||
|
@@ -479,6 +479,7 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver
|
|||||||
'table' => $table,
|
'table' => $table,
|
||||||
'nativetype' => strtoupper($type[0]),
|
'nativetype' => strtoupper($type[0]),
|
||||||
'size' => isset($type[1]) ? (int) $type[1] : NULL,
|
'size' => isset($type[1]) ? (int) $type[1] : NULL,
|
||||||
|
'unsigned' => (bool) strstr('unsigned', $row['Type']),
|
||||||
'nullable' => $row['Null'] === 'YES',
|
'nullable' => $row['Null'] === 'YES',
|
||||||
'default' => $row['Default'],
|
'default' => $row['Default'],
|
||||||
'autoincrement' => $row['Extra'] === 'auto_increment',
|
'autoincrement' => $row['Extra'] === 'auto_increment',
|
||||||
|
@@ -532,6 +532,16 @@ class DibiColumnInfo extends DibiObject
|
|||||||
/**
|
/**
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
|
public function isUnsigned()
|
||||||
|
{
|
||||||
|
return isset($this->info['unsigned']) ? (bool) $this->info['unsigned'] : NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
public function isNullable()
|
public function isNullable()
|
||||||
{
|
{
|
||||||
return isset($this->info['nullable']) ? (bool) $this->info['nullable'] : NULL;
|
return isset($this->info['nullable']) ? (bool) $this->info['nullable'] : NULL;
|
||||||
|
Reference in New Issue
Block a user