1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-10 08:34:20 +02:00

Support JSON since MariaDB 10.2 (bug #590)

This commit is contained in:
Jakub Vrana
2018-01-29 21:08:38 +01:00
parent c3b4208853
commit 75450548b3
4 changed files with 11 additions and 6 deletions

View File

@@ -190,12 +190,12 @@ if (isset($_GET["pgsql"])) {
$connection = new Min_DB;
$credentials = $adminer->credentials();
if ($connection->connect($credentials[0], $credentials[1], $credentials[2])) {
if ($connection->server_info >= 9) {
if (min_version(9, 0, $connection)) {
$connection->query("SET application_name = 'Adminer'");
if ($connection->server_info >= 9.2) {
if (min_version(9.2, 0, $connection)) {
$structured_types[lang('Strings')][] = "json";
$types["json"] = 4294967295;
if ($connection->server_info >= 9.4) {
if (min_version(9.4, 0, $connection)) {
$structured_types[lang('Strings')][] = "jsonb";
$types["jsonb"] = 4294967295;
}