1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-08 07:36:44 +02:00

Move edit functions to Driver

This commit is contained in:
Jakub Vrana
2025-03-06 13:15:38 +01:00
parent 37a75f3759
commit 2f0cd4185b
14 changed files with 65 additions and 67 deletions

View File

@@ -129,6 +129,16 @@ if (isset($_GET["sqlite"])) {
class Driver extends SqlDriver {
protected $types = array(array("integer" => 0, "real" => 0, "numeric" => 0, "text" => 0, "blob" => 0));
var $editFunctions = array(
array(
// "text" => "date('now')/time('now')/datetime('now')",
), array(
"integer|real|numeric" => "+/-",
// "text" => "date/time/datetime",
"text" => "||",
)
);
function structuredTypes() {
return array_keys($this->types[0]);
}
@@ -732,15 +742,6 @@ if (isset($_GET["sqlite"])) {
'operators' => array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT IN", "IS NOT NULL", "SQL"), // REGEXP can be user defined function
'functions' => array("hex", "length", "lower", "round", "unixepoch", "upper"),
'grouping' => array("avg", "count", "count distinct", "group_concat", "max", "min", "sum"),
'edit_functions' => array(
array(
// "text" => "date('now')/time('now')/datetime('now')",
), array(
"integer|real|numeric" => "+/-",
// "text" => "date/time/datetime",
"text" => "||",
)
),
);
}
}