1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-15 11:04:02 +02:00

NoSQL: Allow editing complex values

This commit is contained in:
Jakub Vrana
2013-08-09 15:49:34 -07:00
parent 8a1b8910c1
commit 6317c7737d
4 changed files with 31 additions and 9 deletions

View File

@@ -283,5 +283,5 @@ if (isset($_GET["elastic"])) {
$operators = array("=", "query");
$functions = array();
$grouping = array();
$edit_functions = array();
$edit_functions = array(array("json"));
}

View File

@@ -290,5 +290,5 @@ if (isset($_GET["mongo"])) {
$operators = array("=");
$functions = array();
$grouping = array();
$edit_functions = array();
$edit_functions = array(array("json"));
}

View File

@@ -173,11 +173,15 @@ if (isset($_GET["simpledb"])) {
$key = idf_unescape($key);
if ($val == "NULL") {
$delete["Attribute." . count($delete) . ".Name"] = $key;
} elseif ($key != "itemName()") {
$insert["Attribute.$i.Name"] = $key;
$insert["Attribute.$i.Value"] = idf_unescape($val);
$insert["Attribute.$i.Replace"] = "true";
$i++;
} elseif ($key != "itemName()") { //! allow changing itemName()
foreach ((array) $val as $k => $v) {
$insert["Attribute.$i.Name"] = $key;
$insert["Attribute.$i.Value"] = (is_array($val) ? $v : idf_unescape($v));
if (!$k) {
$insert["Attribute.$i.Replace"] = "true";
}
$i++;
}
}
}
$ids = $this->_extractIds($table, $queryWhere, $limit);
@@ -473,5 +477,5 @@ if (isset($_GET["simpledb"])) {
$operators = array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "IN", "IS NULL", "NOT LIKE", "IS NOT NULL");
$functions = array();
$grouping = array("count");
$edit_functions = array();
$edit_functions = array(array("json"));
}