Types.hx 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. /*
  2. * Copyright (C)2005-2017 Haxe Foundation
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining a
  5. * copy of this software and associated documentation files (the "Software"),
  6. * to deal in the Software without restriction, including without limitation
  7. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  8. * and/or sell copies of the Software, and to permit persons to whom the
  9. * Software is furnished to do so, subject to the following conditions:
  10. *
  11. * The above copyright notice and this permission notice shall be included in
  12. * all copies or substantial portions of the Software.
  13. *
  14. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  20. * DEALINGS IN THE SOFTWARE.
  21. */
  22. package sys.db;
  23. // basic types
  24. /** int with auto increment **/
  25. @:noPackageRestrict
  26. @:deprecated("This class will be removed soon, please install the record-macros library")
  27. typedef SId = Null<Int>
  28. /** int unsigned with auto increment **/
  29. @:deprecated("This class will be removed soon, please install the record-macros library")
  30. typedef SUId = Null<Int>
  31. /** big int with auto increment **/
  32. @:deprecated("This class will be removed soon, please install the record-macros library")
  33. typedef SBigId = Null<Float>
  34. @:deprecated("This class will be removed soon, please install the record-macros library")
  35. typedef SInt = Null<Int>
  36. @:deprecated("This class will be removed soon, please install the record-macros library")
  37. typedef SUInt = Null<Int>
  38. @:deprecated("This class will be removed soon, please install the record-macros library")
  39. typedef SBigInt = Null<Float>
  40. /** single precision float **/
  41. @:deprecated("This class will be removed soon, please install the record-macros library")
  42. typedef SSingle = Null<Float>
  43. /** double precision float **/
  44. @:deprecated("This class will be removed soon, please install the record-macros library")
  45. typedef SFloat = Null<Float>
  46. /** use `tinyint(1)` to distinguish with int **/
  47. @:deprecated("This class will be removed soon, please install the record-macros library")
  48. typedef SBool = Null<Bool>
  49. /** same as `varchar(n)` **/
  50. @:deprecated("This class will be removed soon, please install the record-macros library")
  51. typedef SString<Const> = String
  52. /** date only, use `SDateTime` for date+time **/
  53. @:deprecated("This class will be removed soon, please install the record-macros library")
  54. typedef SDate = Date
  55. /** mysql DateTime **/
  56. @:deprecated("This class will be removed soon, please install the record-macros library")
  57. typedef SDateTime = Date
  58. /** mysql Timestamp **/
  59. @:deprecated("This class will be removed soon, please install the record-macros library")
  60. typedef STimeStamp = Date
  61. /** TinyText (up to 255 bytes) **/
  62. @:deprecated("This class will be removed soon, please install the record-macros library")
  63. typedef STinyText = String
  64. /** Text (up to 64KB) **/
  65. @:deprecated("This class will be removed soon, please install the record-macros library")
  66. typedef SSmallText = String
  67. /** MediumText (up to 24MB) **/
  68. @:deprecated("This class will be removed soon, please install the record-macros library")
  69. typedef SText = String
  70. /** Blob type (up to 64KB) **/
  71. @:deprecated("This class will be removed soon, please install the record-macros library")
  72. typedef SSmallBinary = haxe.io.Bytes
  73. /** LongBlob type (up to 4GB) **/
  74. @:deprecated("This class will be removed soon, please install the record-macros library")
  75. typedef SLongBinary = haxe.io.Bytes
  76. /** MediumBlob type (up to 24MB) **/
  77. @:deprecated("This class will be removed soon, please install the record-macros library")
  78. typedef SBinary = haxe.io.Bytes
  79. /** same as binary(n) **/
  80. @:deprecated("This class will be removed soon, please install the record-macros library")
  81. typedef SBytes<Const> = haxe.io.Bytes
  82. /** one byte signed `-128...127` **/
  83. @:deprecated("This class will be removed soon, please install the record-macros library")
  84. typedef STinyInt = Null<Int>
  85. /** two bytes signed `-32768...32767` **/
  86. @:deprecated("This class will be removed soon, please install the record-macros library")
  87. typedef SSmallInt = Null<Int>
  88. /** three bytes signed `-8388608...8388607` **/
  89. @:deprecated("This class will be removed soon, please install the record-macros library")
  90. typedef SMediumInt = Null<Int>
  91. /** one byte `0...255` **/
  92. @:deprecated("This class will be removed soon, please install the record-macros library")
  93. typedef STinyUInt = Null<Int>
  94. /** two bytes `0...65535` **/
  95. @:deprecated("This class will be removed soon, please install the record-macros library")
  96. typedef SSmallUInt = Null<Int>
  97. /** three bytes `0...16777215` **/
  98. @:deprecated("This class will be removed soon, please install the record-macros library")
  99. typedef SMediumUInt = Null<Int>
  100. // extra
  101. /** specify that this field is nullable **/
  102. @:deprecated("This class will be removed soon, please install the record-macros library")
  103. typedef SNull<T> = Null<T>
  104. /** specify that the integer use custom encoding **/
  105. @:deprecated("This class will be removed soon, please install the record-macros library")
  106. typedef SEncoded = Null<Int>
  107. /** Haxe Serialized string **/
  108. @:deprecated("This class will be removed soon, please install the record-macros library")
  109. typedef SSerialized = String
  110. /** native neko serialized bytes **/
  111. @:deprecated("This class will be removed soon, please install the record-macros library")
  112. typedef SNekoSerialized = haxe.io.Bytes
  113. /** a set of bitflags of different enum values **/
  114. @:deprecated("This class will be removed soon, please install the record-macros library")
  115. typedef SFlags<T:EnumValue> = Null<haxe.EnumFlags<T>>
  116. /** same as `SFlags` but will adapt the storage size to the number of flags **/
  117. @:deprecated("This class will be removed soon, please install the record-macros library")
  118. typedef SSmallFlags<T:EnumValue> = SFlags<T>;
  119. /** allow to store any value in serialized form **/
  120. @:deprecated("This class will be removed soon, please install the record-macros library")
  121. typedef SData<T> = Null<T>
  122. /** allow to store an enum value that does not have parameters as a simple int **/
  123. @:deprecated("This class will be removed soon, please install the record-macros library")
  124. typedef SEnum<E:EnumValue> = Null<E>