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

Move types to Driver

This commit is contained in:
Jakub Vrana
2025-03-06 12:35:20 +01:00
parent d2add4dd72
commit 37a75f3759
15 changed files with 125 additions and 151 deletions

View File

@@ -127,6 +127,11 @@ if (isset($_GET["sqlite"])) {
class Driver extends SqlDriver {
protected $types = array(array("integer" => 0, "real" => 0, "numeric" => 0, "text" => 0, "blob" => 0));
function structuredTypes() {
return array_keys($this->types[0]);
}
function insertUpdate($table, $rows, $primary) {
$values = array();
@@ -720,12 +725,9 @@ if (isset($_GET["sqlite"])) {
}
function driver_config() {
$types = array("integer" => 0, "real" => 0, "numeric" => 0, "text" => 0, "blob" => 0);
return array(
'possible_drivers' => array("SQLite3", "PDO_SQLite"),
'jush' => "sqlite",
'types' => $types,
'structured_types' => array_keys($types),
'unsigned' => array(),
'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"),