* @return mixed Min_DB or string for error
*/
function connect() {
- global $adminer, $types, $structured_types;
+ global $adminer, $types, $structured_types, $edit_functions;
$connection = new Min_DB;
$credentials = $adminer->credentials();
if ($connection->connect($credentials[0], $credentials[1], $credentials[2])) {
$structured_types[lang('Strings')][] = "json";
$types["json"] = 4294967295;
}
+ if (min_version('', 10.7, $connection)) {
+ $structured_types[lang('Strings')][] = "uuid";
+ $types["uuid"] = 128;
+ $edit_functions[0]['uuid'] = 'uuid';
+ }
return $connection;
}
$return = $connection->error;
$server_info = $match[1];
$version = $maria_db;
}
- return (version_compare($server_info, $version) >= 0);
+ return $version && version_compare($server_info, $version) >= 0;
}
/** Get connection charset
$value = "";
$function = "now";
}
+ if ($field["type"] == "uuid" && $value == "uuid()") {
+ $value = "";
+ $function = "uuid";
+ }
input($field, $value, $function);
echo "\n";
}