Skip to content
This repository has been archived by the owner on Feb 4, 2022. It is now read-only.

Commit

Permalink
joomlatools/joomlatools-framework#449: Support JSON columns and defau…
Browse files Browse the repository at this point in the history
…lt to 'raw' filter for unknown column types
  • Loading branch information
ercanozkaya committed Dec 16, 2020
1 parent fa89c67 commit 20b9d90
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion code/database/driver/mysqli.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ class DatabaseDriverMysqli extends DatabaseDriverAbstract
//other
'set' => 'string',
'enum' => 'string',

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

/**
Expand Down Expand Up @@ -571,7 +574,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 = isset($this->_type_map[$type]) ? $this->_type_map[$type] : 'raw';
$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 20b9d90

Please sign in to comment.