Merge pull request #431 from xmujay/0609_monitor
[phpmyadmin/aamir.git] / libraries / Types.class.php
blobc6c007cbfc854f71bccf551b058f30e91cbcca78
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * SQL data types definition
6 * @package PhpMyAdmin
7 */
8 if (! defined('PHPMYADMIN')) {
9 exit;
12 /**
13 * Generic class holding type definitions.
15 * @package PhpMyAdmin
17 class PMA_Types
19 /**
20 * Returns list of unary operators.
22 * @return array
24 public function getUnaryOperators()
26 return array(
27 'IS NULL',
28 'IS NOT NULL',
29 "= ''",
30 "!= ''",
34 /**
35 * Check whether operator is unary.
37 * @param string $op operator name
39 * @return boolean
41 public function isUnaryOperator($op)
43 return in_array($op, $this->getUnaryOperators());
46 /**
47 * Returns list of operators checking for NULL.
49 * @return array
51 public function getNullOperators()
53 return array(
54 'IS NULL',
55 'IS NOT NULL',
59 /**
60 * ENUM search operators
62 * @return array
64 public function getEnumOperators()
66 return array(
67 '=',
68 '!=',
72 /**
73 * TEXT search operators
75 * @return array
77 public function getTextOperators()
79 return array(
80 'LIKE',
81 'LIKE %...%',
82 'NOT LIKE',
83 '=',
84 '!=',
85 'REGEXP',
86 'REGEXP ^...$',
87 'NOT REGEXP',
88 "= ''",
89 "!= ''",
90 'IN (...)',
91 'NOT IN (...)',
92 'BETWEEN',
93 'NOT BETWEEN',
97 /**
98 * Number search operators
100 * @return array
102 public function getNumberOperators()
104 return array(
105 '=',
106 '>',
107 '>=',
108 '<',
109 '<=',
110 '!=',
111 'LIKE',
112 'LIKE %...%',
113 'NOT LIKE',
114 'IN (...)',
115 'NOT IN (...)',
116 'BETWEEN',
117 'NOT BETWEEN',
122 * Returns operators for given type
124 * @param string $type Type of field
125 * @param boolean $null Whether field can be NULL
127 * @return array
129 public function getTypeOperators($type, $null)
131 $ret = array();
132 $class = $this->getTypeClass($type);
134 if (strncasecmp($type, 'enum', 4) == 0) {
135 $ret = array_merge($ret, $this->getEnumOperators());
136 } elseif ($class == 'CHAR') {
137 $ret = array_merge($ret, $this->getTextOperators());
138 } else {
139 $ret = array_merge($ret, $this->getNumberOperators());
142 if ($null) {
143 $ret = array_merge($ret, $this->getNullOperators());
146 return $ret;
150 * Returns operators for given type as html options
152 * @param string $type Type of field
153 * @param boolean $null Whether field can be NULL
154 * @param string $selectedOperator Option to be selected
156 * @return string Generated Html
158 public function getTypeOperatorsHtml($type, $null, $selectedOperator = null)
160 $html = '';
162 foreach ($this->getTypeOperators($type, $null) as $fc) {
163 if (isset($selectedOperator) && $selectedOperator == $fc) {
164 $html .= '<option value="' . htmlspecialchars($fc) . '" selected="selected">'
165 . htmlspecialchars($fc) . '</option>';
166 } else {
167 $html .= '<option value="' . htmlspecialchars($fc) . '">'
168 . htmlspecialchars($fc) . '</option>';
172 return $html;
176 * Returns the data type description.
178 * @param string $type The data type to get a description.
180 * @return string
183 public function getTypeDescription($type)
185 return '';
189 * Returns class of a type, used for functions available for type
190 * or default values.
192 * @param string $type The data type to get a class.
194 * @return string
197 public function getTypeClass($type)
199 return '';
203 * Returns array of functions available for a class.
205 * @param string $class The class to get function list.
207 * @return array
210 public function getFunctionsClass($class)
212 return array();
216 * Returns array of functions available for a type.
218 * @param string $type The data type to get function list.
220 * @return array
223 public function getFunctions($type)
225 $class = $this->getTypeClass($type);
226 return $this->getFunctionsClass($class);
230 * Returns array of all functions available.
232 * @return array
235 public function getAllFunctions()
237 $ret = array_merge(
238 $this->getFunctionsClass('CHAR'),
239 $this->getFunctionsClass('NUMBER'),
240 $this->getFunctionsClass('DATE'),
241 $this->getFunctionsClass('UUID')
243 sort($ret);
244 return $ret;
248 * Returns array of all attributes available.
250 * @return array
253 public function getAttributes()
255 return array();
259 * Returns array of all column types available.
261 * @return array
264 public function getColumns()
266 // most used types
267 return array(
268 'INT',
269 'VARCHAR',
270 'TEXT',
271 'DATE',
277 * Class holding type definitions for MySQL.
279 * @package PhpMyAdmin
281 class PMA_Types_MySQL extends PMA_Types
284 * Returns the data type description.
286 * @param string $type The data type to get a description.
288 * @return string
291 public function getTypeDescription($type)
293 $type = strtoupper($type);
294 switch ($type) {
295 case 'TINYINT':
296 return __('A 1-byte integer, signed range is -128 to 127, unsigned range is 0 to 255');
297 case 'SMALLINT':
298 return __('A 2-byte integer, signed range is -32,768 to 32,767, unsigned range is 0 to 65,535');
299 case 'MEDIUMINT':
300 return __('A 3-byte integer, signed range is -8,388,608 to 8,388,607, unsigned range is 0 to 16,777,215');
301 case 'INT':
302 return __('A 4-byte integer, signed range is -2,147,483,648 to 2,147,483,647, unsigned range is 0 to 4,294,967,295');
303 case 'BIGINT':
304 return __('An 8-byte integer, signed range is -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807, unsigned range is 0 to 18,446,744,073,709,551,615');
305 case 'DECIMAL':
306 return __('A fixed-point number (M, D) - the maximum number of digits (M) is 65 (default 10), the maximum number of decimals (D) is 30 (default 0)');
307 case 'FLOAT':
308 return __('A small floating-point number, allowable values are -3.402823466E+38 to -1.175494351E-38, 0, and 1.175494351E-38 to 3.402823466E+38');
309 case 'DOUBLE':
310 return __('A double-precision floating-point number, allowable values are -1.7976931348623157E+308 to -2.2250738585072014E-308, 0, and 2.2250738585072014E-308 to 1.7976931348623157E+308');
311 case 'REAL':
312 return __('Synonym for DOUBLE (exception: in REAL_AS_FLOAT SQL mode it is a synonym for FLOAT)');
313 case 'BIT':
314 return __('A bit-field type (M), storing M of bits per value (default is 1, maximum is 64)');
315 case 'BOOLEAN':
316 return __('A synonym for TINYINT(1), a value of zero is considered false, nonzero values are considered true');
317 case 'SERIAL':
318 return __('An alias for BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE');
319 case 'DATE':
320 return sprintf(__('A date, supported range is %1$s to %2$s'), '1000-01-01', '9999-12-31');
321 case 'DATETIME':
322 return sprintf(__('A date and time combination, supported range is %1$s to %2$s'), '1000-01-01 00:00:00', '9999-12-31 23:59:59');
323 case 'TIMESTAMP':
324 return __('A timestamp, range is 1970-01-01 00:00:01 UTC to 2038-01-09 03:14:07 UTC, stored as the number of seconds since the epoch (1970-01-01 00:00:00 UTC)');
325 case 'TIME':
326 return sprintf(__('A time, range is %1$s to %2$s'), '-838:59:59', '838:59:59');
327 case 'YEAR':
328 return __("A year in four-digit (4, default) or two-digit (2) format, the allowable values are 70 (1970) to 69 (2069) or 1901 to 2155 and 0000");
329 case 'CHAR':
330 return __('A fixed-length (0-255, default 1) string that is always right-padded with spaces to the specified length when stored');
331 case 'VARCHAR':
332 return sprintf(__('A variable-length (%s) string, the effective maximum length is subject to the maximum row size'), '0-65,535');
333 case 'TINYTEXT':
334 return __('A TEXT column with a maximum length of 255 (2^8 - 1) characters, stored with a one-byte prefix indicating the length of the value in bytes');
335 case 'TEXT':
336 return __('A TEXT column with a maximum length of 65,535 (2^16 - 1) characters, stored with a two-byte prefix indicating the length of the value in bytes');
337 case 'MEDIUMTEXT':
338 return __('A TEXT column with a maximum length of 16,777,215 (2^24 - 1) characters, stored with a three-byte prefix indicating the length of the value in bytes');
339 case 'LONGTEXT':
340 return __('A TEXT column with a maximum length of 4,294,967,295 or 4GiB (2^32 - 1) characters, stored with a four-byte prefix indicating the length of the value in bytes');
341 case 'BINARY':
342 return __('Similar to the CHAR type, but stores binary byte strings rather than non-binary character strings');
343 case 'VARBINARY':
344 return __('Similar to the VARCHAR type, but stores binary byte strings rather than non-binary character strings');
345 case 'TINYBLOB':
346 return __('A BLOB column with a maximum length of 255 (2^8 - 1) bytes, stored with a one-byte prefix indicating the length of the value');
347 case 'MEDIUMBLOB':
348 return __('A BLOB column with a maximum length of 16,777,215 (2^24 - 1) bytes, stored with a three-byte prefix indicating the length of the value');
349 case 'BLOB':
350 return __('A BLOB column with a maximum length of 65,535 (2^16 - 1) bytes, stored with a two-byte prefix indicating the length of the value');
351 case 'LONGBLOB':
352 return __('A BLOB column with a maximum length of 4,294,967,295 or 4GiB (2^32 - 1) bytes, stored with a four-byte prefix indicating the length of the value');
353 case 'ENUM':
354 return __("An enumeration, chosen from the list of up to 65,535 values or the special '' error value");
355 case 'SET':
356 return __("A single value chosen from a set of up to 64 members");
357 case 'GEOMETRY':
358 return __('A type that can store a geometry of any type');
359 case 'POINT':
360 return __('A point in 2-dimensional space');
361 case 'LINESTRING':
362 return __('A curve with linear interpolation between points');
363 case 'POLYGON':
364 return __('A polygon');
365 case 'MULTIPOINT':
366 return __('A collection of points');
367 case 'MULTILINESTRING':
368 return __('A collection of curves with linear interpolation between points');
369 case 'MULTIPOLYGON':
370 return __('A collection of polygons');
371 case 'GEOMETRYCOLLECTION':
372 return __('A collection of geometry objects of any type');
374 return '';
378 * Returns class of a type, used for functions available for type
379 * or default values.
381 * @param string $type The data type to get a class.
383 * @return string
386 public function getTypeClass($type)
388 $type = strtoupper($type);
389 switch ($type) {
390 case 'TINYINT':
391 case 'SMALLINT':
392 case 'MEDIUMINT':
393 case 'INT':
394 case 'BIGINT':
395 case 'DECIMAL':
396 case 'FLOAT':
397 case 'DOUBLE':
398 case 'REAL':
399 case 'BIT':
400 case 'BOOLEAN':
401 case 'SERIAL':
402 return 'NUMBER';
404 case 'DATE':
405 case 'DATETIME':
406 case 'TIMESTAMP':
407 case 'TIME':
408 case 'YEAR':
409 return 'DATE';
411 case 'CHAR':
412 case 'VARCHAR':
413 case 'TINYTEXT':
414 case 'TEXT':
415 case 'MEDIUMTEXT':
416 case 'LONGTEXT':
417 case 'BINARY':
418 case 'VARBINARY':
419 case 'TINYBLOB':
420 case 'MEDIUMBLOB':
421 case 'BLOB':
422 case 'LONGBLOB':
423 case 'ENUM':
424 case 'SET':
425 return 'CHAR';
427 case 'GEOMETRY':
428 case 'POINT':
429 case 'LINESTRING':
430 case 'POLYGON':
431 case 'MULTIPOINT':
432 case 'MULTILINESTRING':
433 case 'MULTIPOLYGON':
434 case 'GEOMETRYCOLLECTION':
435 return 'SPATIAL';
438 return '';
442 * Returns array of functions available for a class.
444 * @param string $class The class to get function list.
446 * @return array
449 public function getFunctionsClass($class)
451 switch ($class) {
452 case 'CHAR':
453 return array(
454 'AES_ENCRYPT',
455 'BIN',
456 'CHAR',
457 'COMPRESS',
458 'CURRENT_USER',
459 'DATABASE',
460 'DAYNAME',
461 'DES_DECRYPT',
462 'DES_ENCRYPT',
463 'ENCRYPT',
464 'HEX',
465 'INET_NTOA',
466 'LOAD_FILE',
467 'LOWER',
468 'LTRIM',
469 'MD5',
470 'MONTHNAME',
471 'OLD_PASSWORD',
472 'PASSWORD',
473 'QUOTE',
474 'REVERSE',
475 'RTRIM',
476 'SHA1',
477 'SOUNDEX',
478 'SPACE',
479 'TRIM',
480 'UNCOMPRESS',
481 'UNHEX',
482 'UPPER',
483 'USER',
484 'UUID',
485 'VERSION',
488 case 'DATE':
489 return array(
490 'CURRENT_DATE',
491 'CURRENT_TIME',
492 'DATE',
493 'FROM_DAYS',
494 'FROM_UNIXTIME',
495 'LAST_DAY',
496 'NOW',
497 'SEC_TO_TIME',
498 'SYSDATE',
499 'TIME',
500 'TIMESTAMP',
501 'UTC_DATE',
502 'UTC_TIME',
503 'UTC_TIMESTAMP',
504 'YEAR',
507 case 'NUMBER':
508 $ret = array(
509 'ABS',
510 'ACOS',
511 'ASCII',
512 'ASIN',
513 'ATAN',
514 'BIT_LENGTH',
515 'BIT_COUNT',
516 'CEILING',
517 'CHAR_LENGTH',
518 'CONNECTION_ID',
519 'COS',
520 'COT',
521 'CRC32',
522 'DAYOFMONTH',
523 'DAYOFWEEK',
524 'DAYOFYEAR',
525 'DEGREES',
526 'EXP',
527 'FLOOR',
528 'HOUR',
529 'INET_ATON',
530 'LENGTH',
531 'LN',
532 'LOG',
533 'LOG2',
534 'LOG10',
535 'MICROSECOND',
536 'MINUTE',
537 'MONTH',
538 'OCT',
539 'ORD',
540 'PI',
541 'QUARTER',
542 'RADIANS',
543 'RAND',
544 'ROUND',
545 'SECOND',
546 'SIGN',
547 'SIN',
548 'SQRT',
549 'TAN',
550 'TO_DAYS',
551 'TO_SECONDS',
552 'TIME_TO_SEC',
553 'UNCOMPRESSED_LENGTH',
554 'UNIX_TIMESTAMP',
555 'UUID_SHORT',
556 'WEEK',
557 'WEEKDAY',
558 'WEEKOFYEAR',
559 'YEARWEEK',
561 // remove functions that are unavailable on current server
562 if (PMA_MYSQL_INT_VERSION < 50500) {
563 $ret = array_diff($ret, array('TO_SECONDS'));
565 if (PMA_MYSQL_INT_VERSION < 50120) {
566 $ret = array_diff($ret, array('UUID_SHORT'));
568 return $ret;
570 case 'SPATIAL':
571 return array(
572 'GeomFromText',
573 'GeomFromWKB',
575 'GeomCollFromText',
576 'LineFromText',
577 'MLineFromText',
578 'PointFromText',
579 'MPointFromText',
580 'PolyFromText',
581 'MPolyFromText',
583 'GeomCollFromWKB',
584 'LineFromWKB',
585 'MLineFromWKB',
586 'PointFromWKB',
587 'MPointFromWKB',
588 'PolyFromWKB',
589 'MPolyFromWKB',
592 return array();
596 * Returns array of all attributes available.
598 * @return array
601 public function getAttributes()
603 return array(
605 'BINARY',
606 'UNSIGNED',
607 'UNSIGNED ZEROFILL',
608 'on update CURRENT_TIMESTAMP',
613 * Returns array of all column types available.
615 * VARCHAR, TINYINT, TEXT and DATE are listed first, based on
616 * estimated popularity.
618 * @return array
621 public function getColumns()
623 $ret = parent::getColumns();
624 // numeric
625 $ret[_pgettext('numeric types', 'Numeric')] = array(
626 'TINYINT',
627 'SMALLINT',
628 'MEDIUMINT',
629 'INT',
630 'BIGINT',
631 '-',
632 'DECIMAL',
633 'FLOAT',
634 'DOUBLE',
635 'REAL',
636 '-',
637 'BIT',
638 'BOOLEAN',
639 'SERIAL',
643 // Date/Time
644 $ret[_pgettext('date and time types', 'Date and time')] = array(
645 'DATE',
646 'DATETIME',
647 'TIMESTAMP',
648 'TIME',
649 'YEAR',
652 // Text
653 $ret[_pgettext('string types', 'String')] = array(
654 'CHAR',
655 'VARCHAR',
656 '-',
657 'TINYTEXT',
658 'TEXT',
659 'MEDIUMTEXT',
660 'LONGTEXT',
661 '-',
662 'BINARY',
663 'VARBINARY',
664 '-',
665 'TINYBLOB',
666 'MEDIUMBLOB',
667 'BLOB',
668 'LONGBLOB',
669 '-',
670 'ENUM',
671 'SET',
674 $ret[_pgettext('spatial types', 'Spatial')] = array(
675 'GEOMETRY',
676 'POINT',
677 'LINESTRING',
678 'POLYGON',
679 'MULTIPOINT',
680 'MULTILINESTRING',
681 'MULTIPOLYGON',
682 'GEOMETRYCOLLECTION',
685 return $ret;
690 * Class holding type definitions for Drizzle.
692 * @package PhpMyAdmin
694 class PMA_Types_Drizzle extends PMA_Types
697 * Returns the data type description.
699 * @param string $type The data type to get a description.
701 * @return string
704 public function getTypeDescription($type)
706 $type = strtoupper($type);
707 switch ($type) {
708 case 'INTEGER':
709 return __('A 4-byte integer, range is -2,147,483,648 to 2,147,483,647');
710 case 'BIGINT':
711 return __('An 8-byte integer, range is -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807');
712 case 'DECIMAL':
713 return __('A fixed-point number (M, D) - the maximum number of digits (M) is 65 (default 10), the maximum number of decimals (D) is 30 (default 0)');
714 case 'DOUBLE':
715 return __("A system's default double-precision floating-point number");
716 case 'BOOLEAN':
717 return __('True or false');
718 case 'SERIAL':
719 return __('An alias for BIGINT NOT NULL AUTO_INCREMENT UNIQUE');
720 case 'UUID':
721 return __('Stores a Universally Unique Identifier (UUID)');
722 case 'DATE':
723 return sprintf(__('A date, supported range is %1$s to %2$s'), '0001-01-01', '9999-12-31');
724 case 'DATETIME':
725 return sprintf(__('A date and time combination, supported range is %1$s to %2$s'), '0001-01-01 00:00:0', '9999-12-31 23:59:59');
726 case 'TIMESTAMP':
727 return __("A timestamp, range is '0001-01-01 00:00:00' UTC to '9999-12-31 23:59:59' UTC; TIMESTAMP(6) can store microseconds");
728 case 'TIME':
729 return sprintf(__('A time, range is %1$s to %2$s'), '00:00:00', '23:59:59');
730 case 'VARCHAR':
731 return sprintf(__('A variable-length (%s) string, the effective maximum length is subject to the maximum row size'), '0-16,383');
732 case 'TEXT':
733 return __('A TEXT column with a maximum length of 65,535 (2^16 - 1) characters, stored with a two-byte prefix indicating the length of the value in bytes');
734 case 'VARBINARY':
735 return __('A variable-length (0-65,535) string, uses binary collation for all comparisons');
736 case 'BLOB':
737 return __('A BLOB column with a maximum length of 65,535 (2^16 - 1) bytes, stored with a two-byte prefix indicating the length of the value');
738 case 'ENUM':
739 return __("An enumeration, chosen from the list of defined values");
741 return '';
745 * Returns class of a type, used for functions available for type
746 * or default values.
748 * @param string $type The data type to get a class.
750 * @return string
753 public function getTypeClass($type)
755 $type = strtoupper($type);
756 switch ($type) {
757 case 'INTEGER':
758 case 'BIGINT':
759 case 'DECIMAL':
760 case 'DOUBLE':
761 case 'BOOLEAN':
762 case 'SERIAL':
763 return 'NUMBER';
765 case 'DATE':
766 case 'DATETIME':
767 case 'TIMESTAMP':
768 case 'TIME':
769 return 'DATE';
771 case 'VARCHAR':
772 case 'TEXT':
773 case 'VARBINARY':
774 case 'BLOB':
775 case 'ENUM':
776 return 'CHAR';
778 case 'UUID':
779 return 'UUID';
781 return '';
785 * Returns array of functions available for a class.
787 * @param string $class The class to get function list.
789 * @return array
792 public function getFunctionsClass($class)
794 switch ($class) {
795 case 'CHAR':
796 $ret = array(
797 'BIN',
798 'CHAR',
799 'COMPRESS',
800 'CURRENT_USER',
801 'DATABASE',
802 'DAYNAME',
803 'HEX',
804 'LOAD_FILE',
805 'LOWER',
806 'LTRIM',
807 'MD5',
808 'MONTHNAME',
809 'QUOTE',
810 'REVERSE',
811 'RTRIM',
812 'SCHEMA',
813 'SPACE',
814 'TRIM',
815 'UNCOMPRESS',
816 'UNHEX',
817 'UPPER',
818 'USER',
819 'UUID',
820 'VERSION',
823 // check for some functions known to be in modules
824 $functions = array(
825 'MYSQL_PASSWORD',
826 'ROT13',
829 // add new functions
830 $sql = "SELECT upper(plugin_name) f
831 FROM data_dictionary.plugins
832 WHERE plugin_name IN ('" . implode("','", $functions) . "')
833 AND plugin_type = 'Function'
834 AND is_active";
835 $drizzle_functions = $GLOBALS['dbi']->fetchResult($sql, 'f', 'f');
836 if (count($drizzle_functions) > 0) {
837 $ret = array_merge($ret, $drizzle_functions);
838 sort($ret);
841 return $ret;
843 case 'UUID':
844 return array(
845 'UUID',
848 case 'DATE':
849 return array(
850 'CURRENT_DATE',
851 'CURRENT_TIME',
852 'DATE',
853 'FROM_DAYS',
854 'FROM_UNIXTIME',
855 'LAST_DAY',
856 'NOW',
857 'SYSDATE',
858 //'TIME', // https://bugs.launchpad.net/drizzle/+bug/804571
859 'TIMESTAMP',
860 'UTC_DATE',
861 'UTC_TIME',
862 'UTC_TIMESTAMP',
863 'YEAR',
866 case 'NUMBER':
867 return array(
868 'ABS',
869 'ACOS',
870 'ASCII',
871 'ASIN',
872 'ATAN',
873 'BIT_COUNT',
874 'CEILING',
875 'CHAR_LENGTH',
876 'CONNECTION_ID',
877 'COS',
878 'COT',
879 'CRC32',
880 'DAYOFMONTH',
881 'DAYOFWEEK',
882 'DAYOFYEAR',
883 'DEGREES',
884 'EXP',
885 'FLOOR',
886 'HOUR',
887 'LENGTH',
888 'LN',
889 'LOG',
890 'LOG2',
891 'LOG10',
892 'MICROSECOND',
893 'MINUTE',
894 'MONTH',
895 'OCT',
896 'ORD',
897 'PI',
898 'QUARTER',
899 'RADIANS',
900 'RAND',
901 'ROUND',
902 'SECOND',
903 'SIGN',
904 'SIN',
905 'SQRT',
906 'TAN',
907 'TO_DAYS',
908 'TIME_TO_SEC',
909 'UNCOMPRESSED_LENGTH',
910 'UNIX_TIMESTAMP',
911 //'WEEK', // same as TIME
912 'WEEKDAY',
913 'WEEKOFYEAR',
914 'YEARWEEK',
917 return array();
921 * Returns array of all attributes available.
923 * @return array
926 public function getAttributes()
928 return array(
930 'on update CURRENT_TIMESTAMP',
935 * Returns array of all column types available.
937 * @return array
940 public function getColumns()
942 $types_num = array(
943 'INTEGER',
944 'BIGINT',
945 '-',
946 'DECIMAL',
947 'DOUBLE',
948 '-',
949 'BOOLEAN',
950 'SERIAL',
951 'UUID',
953 $types_date = array(
954 'DATE',
955 'DATETIME',
956 'TIMESTAMP',
957 'TIME',
959 $types_string = array(
960 'VARCHAR',
961 'TEXT',
962 '-',
963 'VARBINARY',
964 'BLOB',
965 '-',
966 'ENUM',
968 if (PMA_MYSQL_INT_VERSION >= 20120130) {
969 $types_string[] = '-';
970 $types_string[] = 'IPV6';
973 $ret = parent::getColumns();
974 // numeric
975 $ret[_pgettext('numeric types', 'Numeric')] = $types_num;
977 // Date/Time
978 $ret[_pgettext('date and time types', 'Date and time')] = $types_date;
980 // Text
981 $ret[_pgettext('string types', 'String')] = $types_string;
983 return $ret;