page_header(($TABLE != "" ? lang('Alter table') : lang('Create table')), $error, array("table" => $TABLE), h($TABLE));
if (!$_POST) {
+ $types = $driver->types();
$row = array(
"Engine" => $_COOKIE["adminer_engine"],
"fields" => array(array("field" => "", "type" => (isset($types["int"]) ? "int" : (isset($types["integer"]) ? "integer" : "")), "on_update" => "")),
class Driver extends SqlDriver {
+ function __construct($connection) {
+ parent::__construct($connection);
+ $this->types = array( //! use sys.types
+ lang('Numbers') => array("tinyint" => 3, "smallint" => 5, "int" => 10, "bigint" => 20, "bit" => 1, "decimal" => 0, "real" => 12, "float" => 53, "smallmoney" => 10, "money" => 20),
+ lang('Date and time') => array("date" => 10, "smalldatetime" => 19, "datetime" => 19, "datetime2" => 19, "time" => 8, "datetimeoffset" => 10),
+ lang('Strings') => array("char" => 8000, "varchar" => 8000, "text" => 2147483647, "nchar" => 4000, "nvarchar" => 4000, "ntext" => 1073741823),
+ lang('Binary') => array("binary" => 8000, "varbinary" => 8000, "image" => 2147483647),
+ );
+ }
function insertUpdate($table, $rows, $primary) {
$fields = fields($table);
function driver_config() {
global $on_actions;
$on_actions = str_replace('RESTRICT|', '', $on_actions);
- $types = array();
- $structured_types = array();
- foreach (
- array( //! use sys.types
- lang('Numbers') => array("tinyint" => 3, "smallint" => 5, "int" => 10, "bigint" => 20, "bit" => 1, "decimal" => 0, "real" => 12, "float" => 53, "smallmoney" => 10, "money" => 20),
- lang('Date and time') => array("date" => 10, "smalldatetime" => 19, "datetime" => 19, "datetime2" => 19, "time" => 8, "datetimeoffset" => 10),
- lang('Strings') => array("char" => 8000, "varchar" => 8000, "text" => 2147483647, "nchar" => 4000, "nvarchar" => 4000, "ntext" => 1073741823),
- lang('Binary') => array("binary" => 8000, "varbinary" => 8000, "image" => 2147483647),
- ) as $key => $val
- ) {
- $types += $val;
- $structured_types[$key] = array_keys($val);
- }
return array(
'possible_drivers' => array("SQLSRV", "PDO_SQLSRV", "PDO_DBLIB"),
'jush' => "mssql",
- 'types' => $types,
- 'structured_types' => $structured_types,
'unsigned' => array(),
'operators' => array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT IN", "IS NOT NULL"),
'functions' => array("len", "lower", "round", "upper"),
class Driver extends SqlDriver {
+ function __construct($connection) {
+ parent::__construct($connection);
+ $this->types = array(
+ lang('Numbers') => array("tinyint" => 3, "smallint" => 5, "mediumint" => 8, "int" => 10, "bigint" => 20, "decimal" => 66, "float" => 12, "double" => 21),
+ lang('Date and time') => array("date" => 10, "datetime" => 19, "timestamp" => 19, "time" => 10, "year" => 4),
+ lang('Strings') => array("char" => 255, "varchar" => 65535, "tinytext" => 255, "text" => 65535, "mediumtext" => 16777215, "longtext" => 4294967295),
+ lang('Lists') => array("enum" => 65535, "set" => 64),
+ lang('Binary') => array("bit" => 20, "binary" => 255, "varbinary" => 65535, "tinyblob" => 255, "blob" => 65535, "mediumblob" => 16777215, "longblob" => 4294967295),
+ lang('Geometry') => array("geometry" => 0, "point" => 0, "linestring" => 0, "polygon" => 0, "multipoint" => 0, "multilinestring" => 0, "multipolygon" => 0, "geometrycollection" => 0),
+ );
+ if (min_version('5.7.8', 10.2, $connection)) {
+ $this->types[lang('Strings')]["json"] = 4294967295;
+ }
+ if (min_version('', 10.7, $connection)) {
+ $this->types[lang('Strings')]["uuid"] = 128;
+ }
+ if (min_version(9, '', $connection)) {
+ $this->types[lang('Numbers')]["vector"] = 16383;
+ }
+ }
function insert($table, $set) {
return ($set ? parent::insert($table, $set) : queries("INSERT INTO " . table($table) . " ()\nVALUES ()"));
* @return mixed Db or string for error
*/
function connect() {
- global $adminer, $types, $structured_types, $edit_functions;
+ global $adminer, $edit_functions;
$connection = new Db;
$credentials = $adminer->credentials();
if ($connection->connect($credentials[0], $credentials[1], $credentials[2])) {
$connection->set_charset(charset($connection)); // available in MySQLi since PHP 5.0.5
$connection->query("SET sql_quote_show_create = 1, autocommit = 1");
- if (min_version('5.7.8', 10.2, $connection)) {
- $structured_types[lang('Strings')][] = "json";
- $types["json"] = 4294967295;
- }
if (min_version('', 10.7, $connection)) {
- $structured_types[lang('Strings')][] = "uuid";
- $types["uuid"] = 128;
$edit_functions[0]['uuid'] = 'uuid';
}
if (min_version(9, '', $connection)) {
- $structured_types[lang('Numbers')][] = "vector";
- $types["vector"] = 16383;
$edit_functions[0]['vector'] = 'string_to_vector';
}
return $connection;
* @return array ["fields" => ["field" => , "type" => , "length" => , "unsigned" => , "inout" => , "collation" => ], "returns" => , "definition" => , "language" => ]
*/
function routine($name, $type) {
- global $connection, $enum_length, $inout, $types;
+ global $connection, $enum_length, $inout, $driver;
$aliases = array("bool", "boolean", "integer", "double precision", "real", "dec", "numeric", "fixed", "national char", "national varchar");
$space = "(?:\\s|/\\*[\s\S]*?\\*/|(?:#|-- )[^\n]*\n?|--\r?\n)";
- $type_pattern = "((" . implode("|", array_merge(array_keys($types), $aliases)) . ")\\b(?:\\s*\\(((?:[^'\")]|$enum_length)++)\\))?\\s*(zerofill\\s*)?(unsigned(?:\\s+zerofill)?)?)(?:\\s*(?:CHARSET|CHARACTER\\s+SET)\\s*['\"]?([^'\"\\s,]+)['\"]?)?";
+ $type_pattern = "((" . implode("|", array_merge(array_keys($driver->types()), $aliases)) . ")\\b(?:\\s*\\(((?:[^'\")]|$enum_length)++)\\))?\\s*(zerofill\\s*)?(unsigned(?:\\s+zerofill)?)?)(?:\\s*(?:CHARSET|CHARACTER\\s+SET)\\s*['\"]?([^'\"\\s,]+)['\"]?)?";
$pattern = "$space*(" . ($type == "FUNCTION" ? "" : $inout) . ")?\\s*(?:`((?:[^`]|``)*)`\\s*|\\b(\\S+)\\s+)$type_pattern";
$create = $connection->result("SHOW CREATE $type " . idf_escape($name), 2);
preg_match("~\\(((?:$pattern\\s*,?)*)\\)\\s*" . ($type == "FUNCTION" ? "RETURNS\\s+$type_pattern\\s+" : "") . "(.*)~is", $create, $match);
}
/** Get driver config
- * @return array ['possible_drivers' => , 'jush' => , 'types' => , 'structured_types' => , 'unsigned' => , 'operators' => , 'functions' => , 'grouping' => , 'edit_functions' => ]
+ * @return array ['possible_drivers' => , 'jush' => , 'unsigned' => , 'operators' => , 'functions' => , 'grouping' => , 'edit_functions' => ]
*/
function driver_config() {
- $types = array(); ///< @var array [$type => $maximum_unsigned_length, ...]
- $structured_types = array(); ///< @var array [$description => [$type, ...], ...]
- foreach (
- array(
- lang('Numbers') => array("tinyint" => 3, "smallint" => 5, "mediumint" => 8, "int" => 10, "bigint" => 20, "decimal" => 66, "float" => 12, "double" => 21),
- lang('Date and time') => array("date" => 10, "datetime" => 19, "timestamp" => 19, "time" => 10, "year" => 4),
- lang('Strings') => array("char" => 255, "varchar" => 65535, "tinytext" => 255, "text" => 65535, "mediumtext" => 16777215, "longtext" => 4294967295),
- lang('Lists') => array("enum" => 65535, "set" => 64),
- lang('Binary') => array("bit" => 20, "binary" => 255, "varbinary" => 65535, "tinyblob" => 255, "blob" => 65535, "mediumblob" => 16777215, "longblob" => 4294967295),
- lang('Geometry') => array("geometry" => 0, "point" => 0, "linestring" => 0, "polygon" => 0, "multipoint" => 0, "multilinestring" => 0, "multipolygon" => 0, "geometrycollection" => 0),
- ) as $key => $val
- ) {
- $types += $val;
- $structured_types[$key] = array_keys($val);
- }
return array(
'possible_drivers' => array("MySQLi", "MySQL", "PDO_MySQL"),
'jush' => "sql", ///< @var string JUSH identifier
- 'types' => $types,
- 'structured_types' => $structured_types,
'unsigned' => array("unsigned", "zerofill", "unsigned zerofill"), ///< @var array number variants
'operators' => array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "REGEXP", "IN", "FIND_IN_SET", "IS NULL", "NOT LIKE", "NOT REGEXP", "NOT IN", "IS NOT NULL", "SQL"), ///< @var array operators used in select
'functions' => array("char_length", "date", "from_unixtime", "lower", "round", "floor", "ceil", "sec_to_time", "time_to_sec", "upper"), ///< @var array functions used in select
class Driver extends SqlDriver {
+ function __construct($connection) {
+ parent::__construct($connection);
+ $this->types = array(
+ lang('Numbers') => array("number" => 38, "binary_float" => 12, "binary_double" => 21),
+ lang('Date and time') => array("date" => 10, "timestamp" => 29, "interval year" => 12, "interval day" => 28), //! year(), day() to second()
+ lang('Strings') => array("char" => 2000, "varchar2" => 4000, "nchar" => 2000, "nvarchar2" => 4000, "clob" => 4294967295, "nclob" => 4294967295),
+ lang('Binary') => array("raw" => 2000, "long raw" => 2147483648, "blob" => 4294967295, "bfile" => 4294967296),
+ );
+ }
//! support empty $set in insert()
}
function driver_config() {
- $types = array();
- $structured_types = array();
- foreach (
- array(
- lang('Numbers') => array("number" => 38, "binary_float" => 12, "binary_double" => 21),
- lang('Date and time') => array("date" => 10, "timestamp" => 29, "interval year" => 12, "interval day" => 28), //! year(), day() to second()
- lang('Strings') => array("char" => 2000, "varchar2" => 4000, "nchar" => 2000, "nvarchar2" => 4000, "clob" => 4294967295, "nclob" => 4294967295),
- lang('Binary') => array("raw" => 2000, "long raw" => 2147483648, "blob" => 4294967295, "bfile" => 4294967296),
- ) as $key => $val
- ) {
- $types += $val;
- $structured_types[$key] = array_keys($val);
- }
return array(
'possible_drivers' => array("OCI8", "PDO_OCI"),
'jush' => "oracle",
- 'types' => $types,
- 'structured_types' => $structured_types,
'unsigned' => array(),
'operators' => array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT IN", "IS NOT NULL", "SQL"),
'functions' => array("length", "lower", "round", "upper"),
class Driver extends SqlDriver {
+ function __construct($connection) {
+ parent::__construct($connection);
+ $this->types = array( //! arrays
+ lang('Numbers') => array("smallint" => 5, "integer" => 10, "bigint" => 19, "boolean" => 1, "numeric" => 0, "real" => 7, "double precision" => 16, "money" => 20),
+ lang('Date and time') => array("date" => 13, "time" => 17, "timestamp" => 20, "timestamptz" => 21, "interval" => 0),
+ lang('Strings') => array("character" => 0, "character varying" => 0, "text" => 0, "tsquery" => 0, "tsvector" => 0, "uuid" => 0, "xml" => 0),
+ lang('Binary') => array("bit" => 0, "bit varying" => 0, "bytea" => 0),
+ lang('Network') => array("cidr" => 43, "inet" => 43, "macaddr" => 17, "macaddr8" => 23, "txid_snapshot" => 0),
+ lang('Geometry') => array("box" => 0, "circle" => 0, "line" => 0, "lseg" => 0, "path" => 0, "point" => 0, "polygon" => 0),
+ );
+ if (min_version(9.2, 0, $connection)) {
+ $this->types[lang('Strings')]["json"] = 4294967295;
+ if (min_version(9.4, 0, $connection)) {
+ $this->types[lang('Strings')]["jsonb"] = 4294967295;
+ }
+ }
+ }
+
+ function setUserTypes($types) {
+ $this->types[lang('User types')] = array_flip($types);
+ }
function insertUpdate($table, $rows, $primary) {
global $connection;
}
function connect() {
- global $adminer, $types, $structured_types;
+ global $adminer;
$connection = new Db;
$credentials = $adminer->credentials();
if ($connection->connect($credentials[0], $credentials[1], $credentials[2])) {
if (min_version(9, 0, $connection)) {
$connection->query("SET application_name = 'Adminer'");
- if (min_version(9.2, 0, $connection)) {
- $structured_types[lang('Strings')][] = "json";
- $types["json"] = 4294967295;
- if (min_version(9.4, 0, $connection)) {
- $structured_types[lang('Strings')][] = "jsonb";
- $types["jsonb"] = 4294967295;
- }
- }
}
return $connection;
}
}
function set_schema($schema, $connection2 = null) {
- global $connection, $types, $structured_types;
+ global $connection, $driver;
if (!$connection2) {
$connection2 = $connection;
}
$return = $connection2->query("SET search_path TO " . idf_escape($schema));
- foreach (types() as $key => $type) { //! get types from current_schemas('t')
- if (!isset($types[$type])) {
- $types[$type] = $key;
- $structured_types[lang('User types')][] = $type;
- }
- }
+ $driver->setUserTypes(types()); //! get types from current_schemas('t')
return $return;
}
}
function driver_config() {
- $types = array();
- $structured_types = array();
- foreach (
- array( //! arrays
- lang('Numbers') => array("smallint" => 5, "integer" => 10, "bigint" => 19, "boolean" => 1, "numeric" => 0, "real" => 7, "double precision" => 16, "money" => 20),
- lang('Date and time') => array("date" => 13, "time" => 17, "timestamp" => 20, "timestamptz" => 21, "interval" => 0),
- lang('Strings') => array("character" => 0, "character varying" => 0, "text" => 0, "tsquery" => 0, "tsvector" => 0, "uuid" => 0, "xml" => 0),
- lang('Binary') => array("bit" => 0, "bit varying" => 0, "bytea" => 0),
- lang('Network') => array("cidr" => 43, "inet" => 43, "macaddr" => 17, "macaddr8" => 23, "txid_snapshot" => 0),
- lang('Geometry') => array("box" => 0, "circle" => 0, "line" => 0, "lseg" => 0, "path" => 0, "point" => 0, "polygon" => 0),
- ) as $key => $val //! can be retrieved from pg_type
- ) {
- $types += $val;
- $structured_types[$key] = array_keys($val);
- }
return array(
'possible_drivers' => array("PgSQL", "PDO_PgSQL"),
'jush' => "pgsql",
- 'types' => $types,
- 'structured_types' => $structured_types,
'unsigned' => array(),
'operators' => array("=", "<", ">", "<=", ">=", "!=", "~", "!~", "LIKE", "LIKE %%", "ILIKE", "ILIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT IN", "IS NOT NULL"), // no "SQL" to avoid CSRF
'functions' => array("char_length", "lower", "round", "to_hex", "to_timestamp", "upper"),
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();
}
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"),
* @return null
*/
function tableStructurePrint($fields) {
- global $structured_types;
+ global $driver;
echo "<div class='scrollable'>\n";
echo "<table class='nowrap odds'>\n";
echo "<thead><tr><th>" . lang('Column') . "<td>" . lang('Type') . (support("comment") ? "<td>" . lang('Comment') : "") . "</thead>\n";
+ $structured_types = $driver->structuredTypes();
foreach ($fields as $field) {
echo "<tr><th>" . h($field["field"]);
$type = h($field["full_type"]);
exit;
}
-global $adminer, $connection, $driver, $drivers, $edit_functions, $enum_length, $error, $functions, $grouping, $HTTPS, $inout, $jush, $LANG, $langs, $on_actions, $permanent, $structured_types, $has_token, $token, $translations, $types, $unsigned, $VERSION; // allows including Adminer inside a function
+global $adminer, $connection, $driver, $drivers, $edit_functions, $enum_length, $error, $functions, $grouping, $HTTPS, $inout, $jush, $LANG, $langs, $on_actions, $permanent, $has_token, $token, $translations, $unsigned, $VERSION; // allows including Adminer inside a function
if (!$_SERVER["REQUEST_URI"]) { // IIS 5 compatibility
$_SERVER["REQUEST_URI"] = $_SERVER["ORIG_PATH_INFO"];
$config = driver_config();
$possible_drivers = $config['possible_drivers'];
$jush = $config['jush'];
-$types = $config['types'];
-$structured_types = $config['structured_types'];
$unsigned = $config['unsigned'];
$operators = $config['operators'];
$functions = $config['functions'];
abstract class SqlDriver {
var $_conn;
+ protected $types = array(); ///< @var array [$description => [$type => $maximum_unsigned_length, ...], ...]
/** Create object for performing database operations
* @param Db
$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]
* @return null
*/
function edit_type($key, $field, $collations, $foreign_keys = array(), $extra_types = array()) {
- global $structured_types, $types, $unsigned, $on_actions;
+ global $driver, $unsigned, $on_actions;
$type = $field["type"];
?><td><select name="<?php echo h($key); ?>[type]" class="type" aria-labelledby="label-type"><?php
- if ($type && !isset($types[$type]) && !isset($foreign_keys[$type]) && !in_array($type, $extra_types)) {
+ if ($type && !array_key_exists($type, $driver->types()) && !isset($foreign_keys[$type]) && !in_array($type, $extra_types)) {
$extra_types[] = $type;
}
+ $structured_types = $driver->structuredTypes();
if ($foreign_keys) {
$structured_types[lang('Foreign keys')] = $foreign_keys;
}
* @return null
*/
function input($field, $value, $function) {
- global $types, $structured_types, $adminer, $jush;
+ global $driver, $adminer, $jush;
$name = h(bracket_escape($field["field"]));
echo "<td class='function'>";
if (is_array($value) && !$function) {
$functions = (isset($_GET["select"]) || $reset ? array("orig" => lang('original')) : array()) + $adminer->editFunctions($field);
$disabled = stripos($field["default"], "GENERATED ALWAYS AS ") === 0 ? " disabled=''" : "";
$attrs = " name='fields[$name]'$disabled";
+ $types = $driver->types();
+ $structured_types = $driver->structuredTypes();
if (in_array($field["type"], (array) $structured_types[lang('User types')])) {
$enums = type_values($types[$field["type"]]);
if ($enums) {
<p>
<?php
if ($TYPE != "") {
+ $types = $driver->types();
$enums = type_values($types[$TYPE]);
if ($enums) {
echo "<code class='jush-$jush'>ENUM (" . h($enums) . ")</code>\n<p>";
class Driver extends SqlDriver {
+ function __construct($connection) {
+ parent::__construct($connection);
+ $this->types = array( //! arrays
+ lang('Numbers') => array("Int8" => 3, "Int16" => 5, "Int32" => 10, "Int64" => 19, "UInt8" => 3, "UInt16" => 5, "UInt32" => 10, "UInt64" => 20, "Float32" => 7, "Float64" => 16, 'Decimal' => 38, 'Decimal32' => 9, 'Decimal64' => 18, 'Decimal128' => 38),
+ lang('Date and time') => array("Date" => 13, "DateTime" => 20),
+ lang('Strings') => array("String" => 0),
+ lang('Binary') => array("FixedString" => 0),
+ );
+ }
+
function delete($table, $queryWhere, $limit = 0) {
if ($queryWhere === '') {
$queryWhere = 'WHERE 1=1';
}
function driver_config() {
- $types = array();
- $structured_types = array();
- foreach (
- array( //! arrays
- lang('Numbers') => array("Int8" => 3, "Int16" => 5, "Int32" => 10, "Int64" => 19, "UInt8" => 3, "UInt16" => 5, "UInt32" => 10, "UInt64" => 20, "Float32" => 7, "Float64" => 16, 'Decimal' => 38, 'Decimal32' => 9, 'Decimal64' => 18, 'Decimal128' => 38),
- lang('Date and time') => array("Date" => 13, "DateTime" => 20),
- lang('Strings') => array("String" => 0),
- lang('Binary') => array("FixedString" => 0),
- ) as $key => $val
- ) {
- $types += $val;
- $structured_types[$key] = array_keys($val);
- }
return array(
'jush' => "clickhouse",
- 'types' => $types,
- 'structured_types' => $structured_types,
'unsigned' => array(),
'operators' => array("=", "<", ">", "<=", ">=", "!=", "~", "!~", "LIKE", "LIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT IN", "IS NOT NULL", "SQL"),
'functions' => array(),
}
class Driver extends SqlDriver {
+ function __construct($connection) {
+ parent::__construct($connection);
+ $this->types = array(
+ lang('Numbers') => array("long" => 3, "integer" => 5, "short" => 8, "byte" => 10, "double" => 20, "float" => 66, "half_float" => 12, "scaled_float" => 21),
+ lang('Date and time') => array("date" => 10),
+ lang('Strings') => array("string" => 65535, "text" => 65535),
+ lang('Binary') => array("binary" => 255),
+ );
+ }
function select($table, $select, $where, $group, $order = array(), $limit = 1, $page = 0, $print = false) {
$data = array();
}
function driver_config() {
- $types = array();
- $structured_types = array();
-
- foreach (
- array(
- lang('Numbers') => array("long" => 3, "integer" => 5, "short" => 8, "byte" => 10, "double" => 20, "float" => 66, "half_float" => 12, "scaled_float" => 21),
- lang('Date and time') => array("date" => 10),
- lang('Strings') => array("string" => 65535, "text" => 65535),
- lang('Binary') => array("binary" => 255),
- ) as $key => $val
- ) {
- $types += $val;
- $structured_types[$key] = array_keys($val);
- }
-
return array(
'possible_drivers' => array("json + allow_url_fopen"),
'jush' => "elastic",
'functions' => array(),
'grouping' => array(),
'edit_functions' => array(array("json")),
- 'types' => $types,
- 'structured_types' => $structured_types,
);
}
}
}
class Driver extends SqlDriver {
+ function __construct($connection) {
+ parent::__construct($connection);
+ $this->types = array(
+ lang('Numbers') => array("long" => 3, "integer" => 5, "short" => 8, "byte" => 10, "double" => 20, "float" => 66, "half_float" => 12, "scaled_float" => 21),
+ lang('Date and time') => array("date" => 10),
+ lang('Strings') => array("string" => 65535, "text" => 65535),
+ lang('Binary') => array("binary" => 255),
+ );
+ }
function select($table, $select, $where, $group, $order = array(), $limit = 1, $page = 0, $print = false) {
$data = array();
}
function driver_config() {
- $types = array();
- $structured_types = array();
-
- foreach (
- array(
- lang('Numbers') => array("long" => 3, "integer" => 5, "short" => 8, "byte" => 10, "double" => 20, "float" => 66, "half_float" => 12, "scaled_float" => 21),
- lang('Date and time') => array("date" => 10),
- lang('Strings') => array("string" => 65535, "text" => 65535),
- lang('Binary') => array("binary" => 255),
- ) as $key => $val
- ) {
- $types += $val;
- $structured_types[$key] = array_keys($val);
- }
-
return array(
'possible_drivers' => array("json + allow_url_fopen"),
'jush' => "elastic",
'functions' => array(),
'grouping' => array(),
'edit_functions' => array(array("json")),
- 'types' => $types,
- 'structured_types' => $structured_types,
);
}
}