Skip to content

Commit

Permalink
#449: Support JSON columns and default to 'raw' filter for unknown co…
Browse files Browse the repository at this point in the history
…lumn types
  • Loading branch information
ercanozkaya committed Dec 16, 2020
1 parent d679e99 commit 0d4c624
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ class KDatabaseAdapterMysqli extends KDatabaseAdapterAbstract
//other
'set' => 'string',
'enum' => 'string',

//json
'json' => 'json',
);

/**
Expand Down Expand Up @@ -537,7 +540,7 @@ protected function _parseColumnInfo($info)
$column->primary = $info->Key == 'PRI';
$column->unique = ($info->Key == 'UNI' || $info->Key == 'PRI');
$column->autoinc = strpos($info->Extra, 'auto_increment') !== false;
$column->filter = $this->_type_map[$type];
$column->filter = (isset($this->_type_map[$type]) ? $this->_type_map[$type] : 'raw');

// Don't keep "size" for integers.
if(substr($type, -3) == 'int') {
Expand Down

0 comments on commit 0d4c624

Please sign in to comment.