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:
@@ -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]
|
||||
|
Reference in New Issue
Block a user