1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-15 19:13:59 +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

@@ -24,6 +24,7 @@ function get_driver($id) {
abstract class SqlDriver {
var $_conn;
protected $types = array(); ///< @var array [$description => [$type => $maximum_unsigned_length, ...], ...]
/** Create object for performing database operations
* @param Db
@@ -32,6 +33,20 @@ abstract class SqlDriver {
$this->_conn = $connection;
}
/** Get all types
* @return array [$type => $maximum_unsigned_length, ...]
*/
function types() {
return call_user_func_array('array_merge', array_values($this->types));
}
/** Get structured types
* @return array [$description => [$type, ...], ...]
*/
function structuredTypes() {
return array_map('array_keys', $this->types);
}
/** Select data from table
* @param string
* @param array result of $adminer->selectColumnsProcess()[0]