From 20b9d90533110dfb349b58a40ee0bf037af5a129 Mon Sep 17 00:00:00 2001 From: Ercan Ozkaya Date: Wed, 16 Dec 2020 15:58:04 +0300 Subject: [PATCH] joomlatools/joomlatools-framework#449: Support JSON columns and default to 'raw' filter for unknown column types --- code/database/driver/mysqli.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/database/driver/mysqli.php b/code/database/driver/mysqli.php index 93f14b895..4c6d14dca 100644 --- a/code/database/driver/mysqli.php +++ b/code/database/driver/mysqli.php @@ -86,6 +86,9 @@ class DatabaseDriverMysqli extends DatabaseDriverAbstract //other 'set' => 'string', 'enum' => 'string', + + //json + 'json' => 'json', ); /** @@ -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') {