mirror of
https://github.com/vrana/adminer.git
synced 2025-08-09 08:06:59 +02:00
support for array values in clickhouse driver
This commit is contained in:
committed by
Jakub Vrana
parent
12427467f7
commit
2385bf72bd
@@ -90,8 +90,14 @@ if (isset($_GET["clickhouse"])) {
|
||||
var $num_rows, $_rows, $columns, $meta, $_offset = 0;
|
||||
|
||||
function __construct($result) {
|
||||
foreach ($result['data'] as $item) {
|
||||
$row = array();
|
||||
foreach ($item as $key => $val) {
|
||||
$row[$key] = is_scalar($val) ? $val : json_encode($val, 256); // 256 - JSON_UNESCAPED_UNICODE
|
||||
}
|
||||
$this->_rows[] = $row;
|
||||
}
|
||||
$this->num_rows = $result['rows'];
|
||||
$this->_rows = $result['data'];
|
||||
$this->meta = $result['meta'];
|
||||
$this->columns = array_column($this->meta, 'name');
|
||||
reset($this->_rows);
|
||||
|
Reference in New Issue
Block a user