You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Types.php 2.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * @copyright 2021 Christoph Wurst <christoph@winzerhof-wurst.at>
  5. *
  6. * @author Christoph Wurst <christoph@winzerhof-wurst.at>
  7. *
  8. * @license GNU AGPL version 3 or any later version
  9. *
  10. * This program is free software: you can redistribute it and/or modify
  11. * it under the terms of the GNU Affero General Public License as
  12. * published by the Free Software Foundation, either version 3 of the
  13. * License, or (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU Affero General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU Affero General Public License
  21. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  22. *
  23. */
  24. namespace OCP\DB;
  25. /**
  26. * Database types supported by Nextcloud's DBs
  27. *
  28. * Use these constants instead of \Doctrine\DBAL\Types\Type or \Doctrine\DBAL\Types\Types
  29. *
  30. * @since 21.0.0
  31. */
  32. final class Types {
  33. /**
  34. * @var string
  35. * @since 21.0.0
  36. */
  37. public const BIGINT = 'bigint';
  38. /**
  39. * @var string
  40. * @since 21.0.0
  41. */
  42. public const BINARY = 'binary';
  43. /**
  44. * @var string
  45. * @since 21.0.0
  46. */
  47. public const BLOB = 'blob';
  48. /**
  49. * @var string
  50. * @since 21.0.0
  51. */
  52. public const BOOLEAN = 'boolean';
  53. /**
  54. * @var string
  55. * @since 21.0.0
  56. */
  57. public const DATE = 'date';
  58. /**
  59. * @var string
  60. * @since 21.0.0
  61. */
  62. public const DATETIME = 'datetime';
  63. /**
  64. * @var string
  65. * @since 21.0.0
  66. */
  67. public const DECIMAL = 'decimal';
  68. /**
  69. * @var string
  70. * @since 21.0.0
  71. */
  72. public const FLOAT = 'float';
  73. /**
  74. * @var string
  75. * @since 21.0.0
  76. */
  77. public const INTEGER = 'integer';
  78. /**
  79. * @var string
  80. * @since 21.0.0
  81. */
  82. public const SMALLINT = 'smallint';
  83. /**
  84. * @var string
  85. * @since 21.0.0
  86. */
  87. public const STRING = 'string';
  88. /**
  89. * @var string
  90. * @since 21.0.0
  91. */
  92. public const TEXT = 'text';
  93. /**
  94. * @var string
  95. * @since 21.0.0
  96. */
  97. public const TIME = 'time';
  98. /**
  99. * @var string
  100. * @since 24.0.0
  101. */
  102. public const JSON = 'json';
  103. }