Translated using Weblate (Danish)
[phpmyadmin.git] / libraries / Types.class.php
blob455c27dc907fcb3d52c68244f293c1ccc1a58c36
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 $selected = ' selected="selected"';
165 } else {
166 $selected = '';
168 $html .= '<option value="' . htmlspecialchars($fc) . '"'
169 . $selected . '>'
170 . htmlspecialchars($fc) . '</option>';
173 return $html;
177 * Returns the data type description.
179 * @param string $type The data type to get a description.
181 * @return string
184 public function getTypeDescription($type)
186 return '';
190 * Returns class of a type, used for functions available for type
191 * or default values.
193 * @param string $type The data type to get a class.
195 * @return string
198 public function getTypeClass($type)
200 return '';
204 * Returns array of functions available for a class.
206 * @param string $class The class to get function list.
208 * @return array
211 public function getFunctionsClass($class)
213 return array();
217 * Returns array of functions available for a type.
219 * @param string $type The data type to get function list.
221 * @return array
224 public function getFunctions($type)
226 $class = $this->getTypeClass($type);
227 return $this->getFunctionsClass($class);
231 * Returns array of all functions available.
233 * @return array
236 public function getAllFunctions()
238 $ret = array_merge(
239 $this->getFunctionsClass('CHAR'),
240 $this->getFunctionsClass('NUMBER'),
241 $this->getFunctionsClass('DATE'),
242 $this->getFunctionsClass('UUID')
244 sort($ret);
245 return $ret;
249 * Returns array of all attributes available.
251 * @return array
254 public function getAttributes()
256 return array();
260 * Returns array of all column types available.
262 * @return array
265 public function getColumns()
267 // most used types
268 return array(
269 'INT',
270 'VARCHAR',
271 'TEXT',
272 'DATE',
278 * Class holding type definitions for MySQL.
280 * @package PhpMyAdmin
282 class PMA_Types_MySQL extends PMA_Types
285 * Returns the data type description.
287 * @param string $type The data type to get a description.
289 * @return string
292 public function getTypeDescription($type)
294 $type = strtoupper($type);
295 switch ($type) {
296 case 'TINYINT':
297 return __('A 1-byte integer, signed range is -128 to 127, unsigned range is 0 to 255');
298 case 'SMALLINT':
299 return __('A 2-byte integer, signed range is -32,768 to 32,767, unsigned range is 0 to 65,535');
300 case 'MEDIUMINT':
301 return __('A 3-byte integer, signed range is -8,388,608 to 8,388,607, unsigned range is 0 to 16,777,215');
302 case 'INT':
303 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');
304 case 'BIGINT':
305 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');
306 case 'DECIMAL':
307 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)');
308 case 'FLOAT':
309 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');
310 case 'DOUBLE':
311 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');
312 case 'REAL':
313 return __('Synonym for DOUBLE (exception: in REAL_AS_FLOAT SQL mode it is a synonym for FLOAT)');
314 case 'BIT':
315 return __('A bit-field type (M), storing M of bits per value (default is 1, maximum is 64)');
316 case 'BOOLEAN':
317 return __('A synonym for TINYINT(1), a value of zero is considered false, nonzero values are considered true');
318 case 'SERIAL':
319 return __('An alias for BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE');
320 case 'DATE':
321 return sprintf(__('A date, supported range is %1$s to %2$s'), '1000-01-01', '9999-12-31');
322 case 'DATETIME':
323 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');
324 case 'TIMESTAMP':
325 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)');
326 case 'TIME':
327 return sprintf(__('A time, range is %1$s to %2$s'), '-838:59:59', '838:59:59');
328 case 'YEAR':
329 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");
330 case 'CHAR':
331 return __('A fixed-length (0-255, default 1) string that is always right-padded with spaces to the specified length when stored');
332 case 'VARCHAR':
333 return sprintf(__('A variable-length (%s) string, the effective maximum length is subject to the maximum row size'), '0-65,535');
334 case 'TINYTEXT':
335 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');
336 case 'TEXT':
337 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');
338 case 'MEDIUMTEXT':
339 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');
340 case 'LONGTEXT':
341 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');
342 case 'BINARY':
343 return __('Similar to the CHAR type, but stores binary byte strings rather than non-binary character strings');
344 case 'VARBINARY':
345 return __('Similar to the VARCHAR type, but stores binary byte strings rather than non-binary character strings');
346 case 'TINYBLOB':
347 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');
348 case 'MEDIUMBLOB':
349 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');
350 case 'BLOB':
351 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');
352 case 'LONGBLOB':
353 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');
354 case 'ENUM':
355 return __("An enumeration, chosen from the list of up to 65,535 values or the special '' error value");
356 case 'SET':
357 return __("A single value chosen from a set of up to 64 members");
358 case 'GEOMETRY':
359 return __('A type that can store a geometry of any type');
360 case 'POINT':
361 return __('A point in 2-dimensional space');
362 case 'LINESTRING':
363 return __('A curve with linear interpolation between points');
364 case 'POLYGON':
365 return __('A polygon');
366 case 'MULTIPOINT':
367 return __('A collection of points');
368 case 'MULTILINESTRING':
369 return __('A collection of curves with linear interpolation between points');
370 case 'MULTIPOLYGON':
371 return __('A collection of polygons');
372 case 'GEOMETRYCOLLECTION':
373 return __('A collection of geometry objects of any type');
375 return '';
379 * Returns class of a type, used for functions available for type
380 * or default values.
382 * @param string $type The data type to get a class.
384 * @return string
387 public function getTypeClass($type)
389 $type = strtoupper($type);
390 switch ($type) {
391 case 'TINYINT':
392 case 'SMALLINT':
393 case 'MEDIUMINT':
394 case 'INT':
395 case 'BIGINT':
396 case 'DECIMAL':
397 case 'FLOAT':
398 case 'DOUBLE':
399 case 'REAL':
400 case 'BIT':
401 case 'BOOLEAN':
402 case 'SERIAL':
403 return 'NUMBER';
405 case 'DATE':
406 case 'DATETIME':
407 case 'TIMESTAMP':
408 case 'TIME':
409 case 'YEAR':
410 return 'DATE';
412 case 'CHAR':
413 case 'VARCHAR':
414 case 'TINYTEXT':
415 case 'TEXT':
416 case 'MEDIUMTEXT':
417 case 'LONGTEXT':
418 case 'BINARY':
419 case 'VARBINARY':
420 case 'TINYBLOB':
421 case 'MEDIUMBLOB':
422 case 'BLOB':
423 case 'LONGBLOB':
424 case 'ENUM':
425 case 'SET':
426 return 'CHAR';
428 case 'GEOMETRY':
429 case 'POINT':
430 case 'LINESTRING':
431 case 'POLYGON':
432 case 'MULTIPOINT':
433 case 'MULTILINESTRING':
434 case 'MULTIPOLYGON':
435 case 'GEOMETRYCOLLECTION':
436 return 'SPATIAL';
439 return '';
443 * Returns array of functions available for a class.
445 * @param string $class The class to get function list.
447 * @return array
450 public function getFunctionsClass($class)
452 switch ($class) {
453 case 'CHAR':
454 return array(
455 'AES_ENCRYPT',
456 'BIN',
457 'CHAR',
458 'COMPRESS',
459 'CURRENT_USER',
460 'DATABASE',
461 'DAYNAME',
462 'DES_DECRYPT',
463 'DES_ENCRYPT',
464 'ENCRYPT',
465 'HEX',
466 'INET_NTOA',
467 'LOAD_FILE',
468 'LOWER',
469 'LTRIM',
470 'MD5',
471 'MONTHNAME',
472 'OLD_PASSWORD',
473 'PASSWORD',
474 'QUOTE',
475 'REVERSE',
476 'RTRIM',
477 'SHA1',
478 'SOUNDEX',
479 'SPACE',
480 'TRIM',
481 'UNCOMPRESS',
482 'UNHEX',
483 'UPPER',
484 'USER',
485 'UUID',
486 'VERSION',
489 case 'DATE':
490 return array(
491 'CURRENT_DATE',
492 'CURRENT_TIME',
493 'DATE',
494 'FROM_DAYS',
495 'FROM_UNIXTIME',
496 'LAST_DAY',
497 'NOW',
498 'SEC_TO_TIME',
499 'SYSDATE',
500 'TIME',
501 'TIMESTAMP',
502 'UTC_DATE',
503 'UTC_TIME',
504 'UTC_TIMESTAMP',
505 'YEAR',
508 case 'NUMBER':
509 $ret = array(
510 'ABS',
511 'ACOS',
512 'ASCII',
513 'ASIN',
514 'ATAN',
515 'BIT_LENGTH',
516 'BIT_COUNT',
517 'CEILING',
518 'CHAR_LENGTH',
519 'CONNECTION_ID',
520 'COS',
521 'COT',
522 'CRC32',
523 'DAYOFMONTH',
524 'DAYOFWEEK',
525 'DAYOFYEAR',
526 'DEGREES',
527 'EXP',
528 'FLOOR',
529 'HOUR',
530 'INET_ATON',
531 'LENGTH',
532 'LN',
533 'LOG',
534 'LOG2',
535 'LOG10',
536 'MICROSECOND',
537 'MINUTE',
538 'MONTH',
539 'OCT',
540 'ORD',
541 'PI',
542 'QUARTER',
543 'RADIANS',
544 'RAND',
545 'ROUND',
546 'SECOND',
547 'SIGN',
548 'SIN',
549 'SQRT',
550 'TAN',
551 'TO_DAYS',
552 'TO_SECONDS',
553 'TIME_TO_SEC',
554 'UNCOMPRESSED_LENGTH',
555 'UNIX_TIMESTAMP',
556 'UUID_SHORT',
557 'WEEK',
558 'WEEKDAY',
559 'WEEKOFYEAR',
560 'YEARWEEK',
562 // remove functions that are unavailable on current server
563 if (PMA_MYSQL_INT_VERSION < 50500) {
564 $ret = array_diff($ret, array('TO_SECONDS'));
566 if (PMA_MYSQL_INT_VERSION < 50120) {
567 $ret = array_diff($ret, array('UUID_SHORT'));
569 return $ret;
571 case 'SPATIAL':
572 return array(
573 'GeomFromText',
574 'GeomFromWKB',
576 'GeomCollFromText',
577 'LineFromText',
578 'MLineFromText',
579 'PointFromText',
580 'MPointFromText',
581 'PolyFromText',
582 'MPolyFromText',
584 'GeomCollFromWKB',
585 'LineFromWKB',
586 'MLineFromWKB',
587 'PointFromWKB',
588 'MPointFromWKB',
589 'PolyFromWKB',
590 'MPolyFromWKB',
593 return array();
597 * Returns array of all attributes available.
599 * @return array
602 public function getAttributes()
604 return array(
606 'BINARY',
607 'UNSIGNED',
608 'UNSIGNED ZEROFILL',
609 'on update CURRENT_TIMESTAMP',
614 * Returns array of all column types available.
616 * VARCHAR, TINYINT, TEXT and DATE are listed first, based on
617 * estimated popularity.
619 * @return array
622 public function getColumns()
624 $ret = parent::getColumns();
625 // numeric
626 $ret[_pgettext('numeric types', 'Numeric')] = array(
627 'TINYINT',
628 'SMALLINT',
629 'MEDIUMINT',
630 'INT',
631 'BIGINT',
632 '-',
633 'DECIMAL',
634 'FLOAT',
635 'DOUBLE',
636 'REAL',
637 '-',
638 'BIT',
639 'BOOLEAN',
640 'SERIAL',
644 // Date/Time
645 $ret[_pgettext('date and time types', 'Date and time')] = array(
646 'DATE',
647 'DATETIME',
648 'TIMESTAMP',
649 'TIME',
650 'YEAR',
653 // Text
654 $ret[_pgettext('string types', 'String')] = array(
655 'CHAR',
656 'VARCHAR',
657 '-',
658 'TINYTEXT',
659 'TEXT',
660 'MEDIUMTEXT',
661 'LONGTEXT',
662 '-',
663 'BINARY',
664 'VARBINARY',
665 '-',
666 'TINYBLOB',
667 'MEDIUMBLOB',
668 'BLOB',
669 'LONGBLOB',
670 '-',
671 'ENUM',
672 'SET',
675 $ret[_pgettext('spatial types', 'Spatial')] = array(
676 'GEOMETRY',
677 'POINT',
678 'LINESTRING',
679 'POLYGON',
680 'MULTIPOINT',
681 'MULTILINESTRING',
682 'MULTIPOLYGON',
683 'GEOMETRYCOLLECTION',
686 return $ret;
691 * Class holding type definitions for Drizzle.
693 * @package PhpMyAdmin
695 class PMA_Types_Drizzle extends PMA_Types
698 * Returns the data type description.
700 * @param string $type The data type to get a description.
702 * @return string
705 public function getTypeDescription($type)
707 $type = strtoupper($type);
708 switch ($type) {
709 case 'INTEGER':
710 return __('A 4-byte integer, range is -2,147,483,648 to 2,147,483,647');
711 case 'BIGINT':
712 return __('An 8-byte integer, range is -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807');
713 case 'DECIMAL':
714 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)');
715 case 'DOUBLE':
716 return __("A system's default double-precision floating-point number");
717 case 'BOOLEAN':
718 return __('True or false');
719 case 'SERIAL':
720 return __('An alias for BIGINT NOT NULL AUTO_INCREMENT UNIQUE');
721 case 'UUID':
722 return __('Stores a Universally Unique Identifier (UUID)');
723 case 'DATE':
724 return sprintf(__('A date, supported range is %1$s to %2$s'), '0001-01-01', '9999-12-31');
725 case 'DATETIME':
726 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');
727 case 'TIMESTAMP':
728 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");
729 case 'TIME':
730 return sprintf(__('A time, range is %1$s to %2$s'), '00:00:00', '23:59:59');
731 case 'VARCHAR':
732 return sprintf(__('A variable-length (%s) string, the effective maximum length is subject to the maximum row size'), '0-16,383');
733 case 'TEXT':
734 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');
735 case 'VARBINARY':
736 return __('A variable-length (0-65,535) string, uses binary collation for all comparisons');
737 case 'BLOB':
738 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');
739 case 'ENUM':
740 return __("An enumeration, chosen from the list of defined values");
742 return '';
746 * Returns class of a type, used for functions available for type
747 * or default values.
749 * @param string $type The data type to get a class.
751 * @return string
754 public function getTypeClass($type)
756 $type = strtoupper($type);
757 switch ($type) {
758 case 'INTEGER':
759 case 'BIGINT':
760 case 'DECIMAL':
761 case 'DOUBLE':
762 case 'BOOLEAN':
763 case 'SERIAL':
764 return 'NUMBER';
766 case 'DATE':
767 case 'DATETIME':
768 case 'TIMESTAMP':
769 case 'TIME':
770 return 'DATE';
772 case 'VARCHAR':
773 case 'TEXT':
774 case 'VARBINARY':
775 case 'BLOB':
776 case 'ENUM':
777 return 'CHAR';
779 case 'UUID':
780 return 'UUID';
782 return '';
786 * Returns array of functions available for a class.
788 * @param string $class The class to get function list.
790 * @return array
793 public function getFunctionsClass($class)
795 switch ($class) {
796 case 'CHAR':
797 $ret = array(
798 'BIN',
799 'CHAR',
800 'COMPRESS',
801 'CURRENT_USER',
802 'DATABASE',
803 'DAYNAME',
804 'HEX',
805 'LOAD_FILE',
806 'LOWER',
807 'LTRIM',
808 'MD5',
809 'MONTHNAME',
810 'QUOTE',
811 'REVERSE',
812 'RTRIM',
813 'SCHEMA',
814 'SPACE',
815 'TRIM',
816 'UNCOMPRESS',
817 'UNHEX',
818 'UPPER',
819 'USER',
820 'UUID',
821 'VERSION',
824 // check for some functions known to be in modules
825 $functions = array(
826 'MYSQL_PASSWORD',
827 'ROT13',
830 // add new functions
831 $sql = "SELECT upper(plugin_name) f
832 FROM data_dictionary.plugins
833 WHERE plugin_name IN ('" . implode("','", $functions) . "')
834 AND plugin_type = 'Function'
835 AND is_active";
836 $drizzle_functions = $GLOBALS['dbi']->fetchResult($sql, 'f', 'f');
837 if (count($drizzle_functions) > 0) {
838 $ret = array_merge($ret, $drizzle_functions);
839 sort($ret);
842 return $ret;
844 case 'UUID':
845 return array(
846 'UUID',
849 case 'DATE':
850 return array(
851 'CURRENT_DATE',
852 'CURRENT_TIME',
853 'DATE',
854 'FROM_DAYS',
855 'FROM_UNIXTIME',
856 'LAST_DAY',
857 'NOW',
858 'SYSDATE',
859 //'TIME', // https://bugs.launchpad.net/drizzle/+bug/804571
860 'TIMESTAMP',
861 'UTC_DATE',
862 'UTC_TIME',
863 'UTC_TIMESTAMP',
864 'YEAR',
867 case 'NUMBER':
868 return array(
869 'ABS',
870 'ACOS',
871 'ASCII',
872 'ASIN',
873 'ATAN',
874 'BIT_COUNT',
875 'CEILING',
876 'CHAR_LENGTH',
877 'CONNECTION_ID',
878 'COS',
879 'COT',
880 'CRC32',
881 'DAYOFMONTH',
882 'DAYOFWEEK',
883 'DAYOFYEAR',
884 'DEGREES',
885 'EXP',
886 'FLOOR',
887 'HOUR',
888 'LENGTH',
889 'LN',
890 'LOG',
891 'LOG2',
892 'LOG10',
893 'MICROSECOND',
894 'MINUTE',
895 'MONTH',
896 'OCT',
897 'ORD',
898 'PI',
899 'QUARTER',
900 'RADIANS',
901 'RAND',
902 'ROUND',
903 'SECOND',
904 'SIGN',
905 'SIN',
906 'SQRT',
907 'TAN',
908 'TO_DAYS',
909 'TIME_TO_SEC',
910 'UNCOMPRESSED_LENGTH',
911 'UNIX_TIMESTAMP',
912 //'WEEK', // same as TIME
913 'WEEKDAY',
914 'WEEKOFYEAR',
915 'YEARWEEK',
918 return array();
922 * Returns array of all attributes available.
924 * @return array
927 public function getAttributes()
929 return array(
931 'on update CURRENT_TIMESTAMP',
936 * Returns array of all column types available.
938 * @return array
941 public function getColumns()
943 $types_num = array(
944 'INTEGER',
945 'BIGINT',
946 '-',
947 'DECIMAL',
948 'DOUBLE',
949 '-',
950 'BOOLEAN',
951 'SERIAL',
952 'UUID',
954 $types_date = array(
955 'DATE',
956 'DATETIME',
957 'TIMESTAMP',
958 'TIME',
960 $types_string = array(
961 'VARCHAR',
962 'TEXT',
963 '-',
964 'VARBINARY',
965 'BLOB',
966 '-',
967 'ENUM',
969 if (PMA_MYSQL_INT_VERSION >= 20120130) {
970 $types_string[] = '-';
971 $types_string[] = 'IPV6';
974 $ret = parent::getColumns();
975 // numeric
976 $ret[_pgettext('numeric types', 'Numeric')] = $types_num;
978 // Date/Time
979 $ret[_pgettext('date and time types', 'Date and time')] = $types_date;
981 // Text
982 $ret[_pgettext('string types', 'String')] = $types_string;
984 return $ret;