Upgraded phpmyadmin to 4.0.4 (All Languages) - No modifications yet
[openemr.git] / phpmyadmin / libraries / Types.class.php
blob81e037e1f14ee774da4bf7a91f0a5586ec553cab
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 'BIN',
455 'CHAR',
456 'COMPRESS',
457 'CURRENT_USER',
458 'DATABASE',
459 'DAYNAME',
460 'DES_DECRYPT',
461 'DES_ENCRYPT',
462 'ENCRYPT',
463 'HEX',
464 'INET_NTOA',
465 'LOAD_FILE',
466 'LOWER',
467 'LTRIM',
468 'MD5',
469 'MONTHNAME',
470 'OLD_PASSWORD',
471 'PASSWORD',
472 'QUOTE',
473 'REVERSE',
474 'RTRIM',
475 'SHA1',
476 'SOUNDEX',
477 'SPACE',
478 'TRIM',
479 'UNCOMPRESS',
480 'UNHEX',
481 'UPPER',
482 'USER',
483 'UUID',
484 'VERSION',
487 case 'DATE':
488 return array(
489 'CURRENT_DATE',
490 'CURRENT_TIME',
491 'DATE',
492 'FROM_DAYS',
493 'FROM_UNIXTIME',
494 'LAST_DAY',
495 'NOW',
496 'SEC_TO_TIME',
497 'SYSDATE',
498 'TIME',
499 'TIMESTAMP',
500 'UTC_DATE',
501 'UTC_TIME',
502 'UTC_TIMESTAMP',
503 'YEAR',
506 case 'NUMBER':
507 $ret = array(
508 'ABS',
509 'ACOS',
510 'ASCII',
511 'ASIN',
512 'ATAN',
513 'BIT_LENGTH',
514 'BIT_COUNT',
515 'CEILING',
516 'CHAR_LENGTH',
517 'CONNECTION_ID',
518 'COS',
519 'COT',
520 'CRC32',
521 'DAYOFMONTH',
522 'DAYOFWEEK',
523 'DAYOFYEAR',
524 'DEGREES',
525 'EXP',
526 'FLOOR',
527 'HOUR',
528 'INET_ATON',
529 'LENGTH',
530 'LN',
531 'LOG',
532 'LOG2',
533 'LOG10',
534 'MICROSECOND',
535 'MINUTE',
536 'MONTH',
537 'OCT',
538 'ORD',
539 'PI',
540 'QUARTER',
541 'RADIANS',
542 'RAND',
543 'ROUND',
544 'SECOND',
545 'SIGN',
546 'SIN',
547 'SQRT',
548 'TAN',
549 'TO_DAYS',
550 'TO_SECONDS',
551 'TIME_TO_SEC',
552 'UNCOMPRESSED_LENGTH',
553 'UNIX_TIMESTAMP',
554 'UUID_SHORT',
555 'WEEK',
556 'WEEKDAY',
557 'WEEKOFYEAR',
558 'YEARWEEK',
560 // remove functions that are unavailable on current server
561 if (PMA_MYSQL_INT_VERSION < 50500) {
562 $ret = array_diff($ret, array('TO_SECONDS'));
564 if (PMA_MYSQL_INT_VERSION < 50120) {
565 $ret = array_diff($ret, array('UUID_SHORT'));
567 return $ret;
569 case 'SPATIAL':
570 return array(
571 'GeomFromText',
572 'GeomFromWKB',
574 'GeomCollFromText',
575 'LineFromText',
576 'MLineFromText',
577 'PointFromText',
578 'MPointFromText',
579 'PolyFromText',
580 'MPolyFromText',
582 'GeomCollFromWKB',
583 'LineFromWKB',
584 'MLineFromWKB',
585 'PointFromWKB',
586 'MPointFromWKB',
587 'PolyFromWKB',
588 'MPolyFromWKB',
591 return array();
595 * Returns array of all attributes available.
597 * @return array
600 public function getAttributes()
602 return array(
604 'BINARY',
605 'UNSIGNED',
606 'UNSIGNED ZEROFILL',
607 'on update CURRENT_TIMESTAMP',
612 * Returns array of all column types available.
614 * VARCHAR, TINYINT, TEXT and DATE are listed first, based on
615 * estimated popularity.
617 * @return array
620 public function getColumns()
622 $ret = parent::getColumns();
623 // numeric
624 $ret[_pgettext('numeric types', 'Numeric')] = array(
625 'TINYINT',
626 'SMALLINT',
627 'MEDIUMINT',
628 'INT',
629 'BIGINT',
630 '-',
631 'DECIMAL',
632 'FLOAT',
633 'DOUBLE',
634 'REAL',
635 '-',
636 'BIT',
637 'BOOLEAN',
638 'SERIAL',
642 // Date/Time
643 $ret[_pgettext('date and time types', 'Date and time')] = array(
644 'DATE',
645 'DATETIME',
646 'TIMESTAMP',
647 'TIME',
648 'YEAR',
651 // Text
652 $ret[_pgettext('string types', 'String')] = array(
653 'CHAR',
654 'VARCHAR',
655 '-',
656 'TINYTEXT',
657 'TEXT',
658 'MEDIUMTEXT',
659 'LONGTEXT',
660 '-',
661 'BINARY',
662 'VARBINARY',
663 '-',
664 'TINYBLOB',
665 'MEDIUMBLOB',
666 'BLOB',
667 'LONGBLOB',
668 '-',
669 'ENUM',
670 'SET',
673 $ret[_pgettext('spatial types', 'Spatial')] = array(
674 'GEOMETRY',
675 'POINT',
676 'LINESTRING',
677 'POLYGON',
678 'MULTIPOINT',
679 'MULTILINESTRING',
680 'MULTIPOLYGON',
681 'GEOMETRYCOLLECTION',
684 return $ret;
689 * Class holding type definitions for Drizzle.
691 * @package PhpMyAdmin
693 class PMA_Types_Drizzle extends PMA_Types
696 * Returns the data type description.
698 * @param string $type The data type to get a description.
700 * @return string
703 public function getTypeDescription($type)
705 $type = strtoupper($type);
706 switch ($type) {
707 case 'INTEGER':
708 return __('A 4-byte integer, range is -2,147,483,648 to 2,147,483,647');
709 case 'BIGINT':
710 return __('An 8-byte integer, range is -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807');
711 case 'DECIMAL':
712 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)');
713 case 'DOUBLE':
714 return __("A system's default double-precision floating-point number");
715 case 'BOOLEAN':
716 return __('True or false');
717 case 'SERIAL':
718 return __('An alias for BIGINT NOT NULL AUTO_INCREMENT UNIQUE');
719 case 'UUID':
720 return __('Stores a Universally Unique Identifier (UUID)');
721 case 'DATE':
722 return sprintf(__('A date, supported range is %1$s to %2$s'), '0001-01-01', '9999-12-31');
723 case 'DATETIME':
724 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');
725 case 'TIMESTAMP':
726 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");
727 case 'TIME':
728 return sprintf(__('A time, range is %1$s to %2$s'), '00:00:00', '23:59:59');
729 case 'VARCHAR':
730 return sprintf(__('A variable-length (%s) string, the effective maximum length is subject to the maximum row size'), '0-16,383');
731 case 'TEXT':
732 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');
733 case 'VARBINARY':
734 return __('A variable-length (0-65,535) string, uses binary collation for all comparisons');
735 case 'BLOB':
736 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');
737 case 'ENUM':
738 return __("An enumeration, chosen from the list of defined values");
740 return '';
744 * Returns class of a type, used for functions available for type
745 * or default values.
747 * @param string $type The data type to get a class.
749 * @return string
752 public function getTypeClass($type)
754 $type = strtoupper($type);
755 switch ($type) {
756 case 'INTEGER':
757 case 'BIGINT':
758 case 'DECIMAL':
759 case 'DOUBLE':
760 case 'BOOLEAN':
761 case 'SERIAL':
762 return 'NUMBER';
764 case 'DATE':
765 case 'DATETIME':
766 case 'TIMESTAMP':
767 case 'TIME':
768 return 'DATE';
770 case 'VARCHAR':
771 case 'TEXT':
772 case 'VARBINARY':
773 case 'BLOB':
774 case 'ENUM':
775 return 'CHAR';
777 case 'UUID':
778 return 'UUID';
780 return '';
784 * Returns array of functions available for a class.
786 * @param string $class The class to get function list.
788 * @return array
791 public function getFunctionsClass($class)
793 switch ($class) {
794 case 'CHAR':
795 $ret = array(
796 'BIN',
797 'CHAR',
798 'COMPRESS',
799 'CURRENT_USER',
800 'DATABASE',
801 'DAYNAME',
802 'HEX',
803 'LOAD_FILE',
804 'LOWER',
805 'LTRIM',
806 'MD5',
807 'MONTHNAME',
808 'QUOTE',
809 'REVERSE',
810 'RTRIM',
811 'SCHEMA',
812 'SPACE',
813 'TRIM',
814 'UNCOMPRESS',
815 'UNHEX',
816 'UPPER',
817 'USER',
818 'UUID',
819 'VERSION',
822 // check for some functions known to be in modules
823 $functions = array(
824 'MYSQL_PASSWORD',
825 'ROT13',
828 // add new functions
829 $sql = "SELECT upper(plugin_name) f
830 FROM data_dictionary.plugins
831 WHERE plugin_name IN ('" . implode("','", $functions) . "')
832 AND plugin_type = 'Function'
833 AND is_active";
834 $drizzle_functions = PMA_DBI_fetch_result($sql, 'f', 'f');
835 if (count($drizzle_functions) > 0) {
836 $ret = array_merge($ret, $drizzle_functions);
837 sort($ret);
840 return $ret;
842 case 'UUID':
843 return array(
844 'UUID',
847 case 'DATE':
848 return array(
849 'CURRENT_DATE',
850 'CURRENT_TIME',
851 'DATE',
852 'FROM_DAYS',
853 'FROM_UNIXTIME',
854 'LAST_DAY',
855 'NOW',
856 'SYSDATE',
857 //'TIME', // https://bugs.launchpad.net/drizzle/+bug/804571
858 'TIMESTAMP',
859 'UTC_DATE',
860 'UTC_TIME',
861 'UTC_TIMESTAMP',
862 'YEAR',
865 case 'NUMBER':
866 return array(
867 'ABS',
868 'ACOS',
869 'ASCII',
870 'ASIN',
871 'ATAN',
872 'BIT_COUNT',
873 'CEILING',
874 'CHAR_LENGTH',
875 'CONNECTION_ID',
876 'COS',
877 'COT',
878 'CRC32',
879 'DAYOFMONTH',
880 'DAYOFWEEK',
881 'DAYOFYEAR',
882 'DEGREES',
883 'EXP',
884 'FLOOR',
885 'HOUR',
886 'LENGTH',
887 'LN',
888 'LOG',
889 'LOG2',
890 'LOG10',
891 'MICROSECOND',
892 'MINUTE',
893 'MONTH',
894 'OCT',
895 'ORD',
896 'PI',
897 'QUARTER',
898 'RADIANS',
899 'RAND',
900 'ROUND',
901 'SECOND',
902 'SIGN',
903 'SIN',
904 'SQRT',
905 'TAN',
906 'TO_DAYS',
907 'TIME_TO_SEC',
908 'UNCOMPRESSED_LENGTH',
909 'UNIX_TIMESTAMP',
910 //'WEEK', // same as TIME
911 'WEEKDAY',
912 'WEEKOFYEAR',
913 'YEARWEEK',
916 return array();
920 * Returns array of all attributes available.
922 * @return array
925 public function getAttributes()
927 return array(
929 'on update CURRENT_TIMESTAMP',
934 * Returns array of all column types available.
936 * @return array
939 public function getColumns()
941 $types_num = array(
942 'INTEGER',
943 'BIGINT',
944 '-',
945 'DECIMAL',
946 'DOUBLE',
947 '-',
948 'BOOLEAN',
949 'SERIAL',
950 'UUID',
952 $types_date = array(
953 'DATE',
954 'DATETIME',
955 'TIMESTAMP',
956 'TIME',
958 $types_string = array(
959 'VARCHAR',
960 'TEXT',
961 '-',
962 'VARBINARY',
963 'BLOB',
964 '-',
965 'ENUM',
967 if (PMA_MYSQL_INT_VERSION >= 20120130) {
968 $types_string[] = '-';
969 $types_string[] = 'IPV6';
972 $ret = parent::getColumns();
973 // numeric
974 $ret[_pgettext('numeric types', 'Numeric')] = $types_num;
976 // Date/Time
977 $ret[_pgettext('date and time types', 'Date and time')] = $types_date;
979 // Text
980 $ret[_pgettext('string types', 'String')] = $types_string;
982 return $ret;