@relq/orm 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (254) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +236 -0
  3. package/dist/cjs/__test-types.cjs +17 -0
  4. package/dist/cjs/addon/cursor.cjs +1473 -0
  5. package/dist/cjs/addon/pg.cjs +4969 -0
  6. package/dist/cjs/cache/index.cjs +9 -0
  7. package/dist/cjs/cache/query-cache.cjs +311 -0
  8. package/dist/cjs/condition/array-condition-builder.cjs +527 -0
  9. package/dist/cjs/condition/array-numeric-condition-builder.cjs +186 -0
  10. package/dist/cjs/condition/array-specialized-condition-builder.cjs +206 -0
  11. package/dist/cjs/condition/array-string-condition-builder.cjs +146 -0
  12. package/dist/cjs/condition/base-condition-builder.cjs +2 -0
  13. package/dist/cjs/condition/condition-collector.cjs +461 -0
  14. package/dist/cjs/condition/fulltext-condition-builder.cjs +61 -0
  15. package/dist/cjs/condition/geometric-condition-builder.cjs +228 -0
  16. package/dist/cjs/condition/index.cjs +29 -0
  17. package/dist/cjs/condition/jsonb-condition-builder.cjs +448 -0
  18. package/dist/cjs/condition/network-condition-builder.cjs +237 -0
  19. package/dist/cjs/condition/postgis-condition-builder.cjs +188 -0
  20. package/dist/cjs/condition/range-condition-builder.cjs +98 -0
  21. package/dist/cjs/core/helpers/ConnectedAggregateBuilder.cjs +132 -0
  22. package/dist/cjs/core/helpers/ConnectedCTEBuilder.cjs +53 -0
  23. package/dist/cjs/core/helpers/ConnectedCountBuilder.cjs +73 -0
  24. package/dist/cjs/core/helpers/ConnectedDeleteBuilder.cjs +65 -0
  25. package/dist/cjs/core/helpers/ConnectedInsertBuilder.cjs +112 -0
  26. package/dist/cjs/core/helpers/ConnectedInsertFromSelectBuilder.cjs +66 -0
  27. package/dist/cjs/core/helpers/ConnectedQueryBuilder.cjs +146 -0
  28. package/dist/cjs/core/helpers/ConnectedRawQueryBuilder.cjs +46 -0
  29. package/dist/cjs/core/helpers/ConnectedSelectBuilder.cjs +331 -0
  30. package/dist/cjs/core/helpers/ConnectedTransactionBuilder.cjs +105 -0
  31. package/dist/cjs/core/helpers/ConnectedUpdateBuilder.cjs +79 -0
  32. package/dist/cjs/core/helpers/PaginateBuilder.cjs +178 -0
  33. package/dist/cjs/core/helpers/ReturningExecutor.cjs +70 -0
  34. package/dist/cjs/core/helpers/capability-guard.cjs +10 -0
  35. package/dist/cjs/core/helpers/index.cjs +31 -0
  36. package/dist/cjs/core/helpers/methods.cjs +10 -0
  37. package/dist/cjs/core/helpers/query-convenience.cjs +238 -0
  38. package/dist/cjs/core/helpers/select-joins.cjs +251 -0
  39. package/dist/cjs/core/helpers/select-pagination.cjs +233 -0
  40. package/dist/cjs/core/helpers/select-types.cjs +2 -0
  41. package/dist/cjs/core/pg-family/cockroachdb-client/capabilities.cjs +31 -0
  42. package/dist/cjs/core/pg-family/cockroachdb-client/index.cjs +7 -0
  43. package/dist/cjs/core/pg-family/cockroachdb-client/relq-cockroach.cjs +16 -0
  44. package/dist/cjs/core/pg-family/dsql-client/capabilities.cjs +31 -0
  45. package/dist/cjs/core/pg-family/dsql-client/index.cjs +7 -0
  46. package/dist/cjs/core/pg-family/dsql-client/relq-dsql.cjs +16 -0
  47. package/dist/cjs/core/pg-family/index.cjs +19 -0
  48. package/dist/cjs/core/pg-family/nile-client/capabilities.cjs +31 -0
  49. package/dist/cjs/core/pg-family/nile-client/index.cjs +7 -0
  50. package/dist/cjs/core/pg-family/nile-client/relq-nile.cjs +36 -0
  51. package/dist/cjs/core/pg-family/nile-client/tenant-context.cjs +44 -0
  52. package/dist/cjs/core/pg-family/pg-client/capabilities.cjs +31 -0
  53. package/dist/cjs/core/pg-family/pg-client/index.cjs +7 -0
  54. package/dist/cjs/core/pg-family/pg-client/relq-postgres.cjs +43 -0
  55. package/dist/cjs/core/pg-family/shared/pg-base.cjs +385 -0
  56. package/dist/cjs/core/pg-family/shared/pg-dialect.cjs +67 -0
  57. package/dist/cjs/core/pg-family/shared/pg-error-parser.cjs +34 -0
  58. package/dist/cjs/core/pg-family/shared/pg-type-coercion.cjs +14 -0
  59. package/dist/cjs/core/relq-base.cjs +307 -0
  60. package/dist/cjs/core/relq-client.cjs +56 -0
  61. package/dist/cjs/core/shared/cleanup.cjs +36 -0
  62. package/dist/cjs/core/shared/column-mapping.cjs +97 -0
  63. package/dist/cjs/core/shared/errors.cjs +17 -0
  64. package/dist/cjs/core/shared/index.cjs +24 -0
  65. package/dist/cjs/core/shared/table-accessor.cjs +22 -0
  66. package/dist/cjs/core/shared/transform.cjs +35 -0
  67. package/dist/cjs/core/shared/types.cjs +2 -0
  68. package/dist/cjs/core/shared/validation.cjs +140 -0
  69. package/dist/cjs/core/types/core.types.cjs +2 -0
  70. package/dist/cjs/count/count-builder.cjs +88 -0
  71. package/dist/cjs/count/index.cjs +5 -0
  72. package/dist/cjs/delete/delete-builder.cjs +176 -0
  73. package/dist/cjs/delete/index.cjs +5 -0
  74. package/dist/cjs/explain/explain-builder.cjs +99 -0
  75. package/dist/cjs/explain/index.cjs +5 -0
  76. package/dist/cjs/index.cjs +26 -0
  77. package/dist/cjs/insert/conflict-builder.cjs +213 -0
  78. package/dist/cjs/insert/index.cjs +5 -0
  79. package/dist/cjs/insert/insert-builder.cjs +320 -0
  80. package/dist/cjs/insert/insert-from-select-builder.cjs +86 -0
  81. package/dist/cjs/pubsub/index.cjs +7 -0
  82. package/dist/cjs/pubsub/listen-notify-builder.cjs +57 -0
  83. package/dist/cjs/pubsub/listener-connection.cjs +180 -0
  84. package/dist/cjs/raw/index.cjs +8 -0
  85. package/dist/cjs/raw/raw-query-builder.cjs +27 -0
  86. package/dist/cjs/raw/sql-template.cjs +73 -0
  87. package/dist/cjs/select/aggregate-builder.cjs +179 -0
  88. package/dist/cjs/select/index.cjs +16 -0
  89. package/dist/cjs/select/join-builder.cjs +192 -0
  90. package/dist/cjs/select/join-condition-builder.cjs +189 -0
  91. package/dist/cjs/select/join-internals.cjs +5 -0
  92. package/dist/cjs/select/join-many-condition-builder.cjs +159 -0
  93. package/dist/cjs/select/scalar-query-builder.cjs +134 -0
  94. package/dist/cjs/select/scalar-select-builder.cjs +78 -0
  95. package/dist/cjs/select/select-builder.cjs +426 -0
  96. package/dist/cjs/select/sql-expression.cjs +38 -0
  97. package/dist/cjs/select/table-proxy.cjs +99 -0
  98. package/dist/cjs/shared/aws-dsql.cjs +181 -0
  99. package/dist/cjs/shared/errors/relq-errors.cjs +361 -0
  100. package/dist/cjs/shared/pg-format.cjs +383 -0
  101. package/dist/cjs/shared/types/config-types.cjs +51 -0
  102. package/dist/cjs/transaction/index.cjs +6 -0
  103. package/dist/cjs/transaction/transaction-builder.cjs +78 -0
  104. package/dist/cjs/types/aggregate-types.cjs +2 -0
  105. package/dist/cjs/types/inference-types.cjs +18 -0
  106. package/dist/cjs/types/pagination-types.cjs +7 -0
  107. package/dist/cjs/types/result-types.cjs +2 -0
  108. package/dist/cjs/types/scalar-types.cjs +2 -0
  109. package/dist/cjs/types/schema-types.cjs +2 -0
  110. package/dist/cjs/types/subscription-types.cjs +2 -0
  111. package/dist/cjs/types.cjs +2 -0
  112. package/dist/cjs/update/array-update-builder.cjs +232 -0
  113. package/dist/cjs/update/index.cjs +16 -0
  114. package/dist/cjs/update/jsonb-update-builder.cjs +219 -0
  115. package/dist/cjs/update/update-builder.cjs +274 -0
  116. package/dist/cjs/utils/addon/pg/cursor.cjs +8 -0
  117. package/dist/cjs/utils/addon/pg/pg.cjs +23 -0
  118. package/dist/cjs/utils/case-converter.cjs +58 -0
  119. package/dist/cjs/utils/env-resolver.cjs +226 -0
  120. package/dist/cjs/utils/environment-detection.cjs +124 -0
  121. package/dist/cjs/utils/fk-resolver.cjs +186 -0
  122. package/dist/cjs/utils/index.cjs +25 -0
  123. package/dist/cjs/utils/pool-defaults.cjs +91 -0
  124. package/dist/cjs/utils/type-coercion.cjs +120 -0
  125. package/dist/cjs/window/index.cjs +5 -0
  126. package/dist/cjs/window/window-builder.cjs +80 -0
  127. package/dist/esm/__test-types.js +15 -0
  128. package/dist/esm/addon/cursor.js +1440 -0
  129. package/dist/esm/addon/pg.js +4931 -0
  130. package/dist/esm/cache/index.js +1 -0
  131. package/dist/esm/cache/query-cache.js +303 -0
  132. package/dist/esm/condition/array-condition-builder.js +519 -0
  133. package/dist/esm/condition/array-numeric-condition-builder.js +182 -0
  134. package/dist/esm/condition/array-specialized-condition-builder.js +200 -0
  135. package/dist/esm/condition/array-string-condition-builder.js +142 -0
  136. package/dist/esm/condition/base-condition-builder.js +1 -0
  137. package/dist/esm/condition/condition-collector.js +452 -0
  138. package/dist/esm/condition/fulltext-condition-builder.js +53 -0
  139. package/dist/esm/condition/geometric-condition-builder.js +220 -0
  140. package/dist/esm/condition/index.js +8 -0
  141. package/dist/esm/condition/jsonb-condition-builder.js +439 -0
  142. package/dist/esm/condition/network-condition-builder.js +229 -0
  143. package/dist/esm/condition/postgis-condition-builder.js +180 -0
  144. package/dist/esm/condition/range-condition-builder.js +90 -0
  145. package/dist/esm/core/helpers/ConnectedAggregateBuilder.js +128 -0
  146. package/dist/esm/core/helpers/ConnectedCTEBuilder.js +49 -0
  147. package/dist/esm/core/helpers/ConnectedCountBuilder.js +69 -0
  148. package/dist/esm/core/helpers/ConnectedDeleteBuilder.js +61 -0
  149. package/dist/esm/core/helpers/ConnectedInsertBuilder.js +108 -0
  150. package/dist/esm/core/helpers/ConnectedInsertFromSelectBuilder.js +62 -0
  151. package/dist/esm/core/helpers/ConnectedQueryBuilder.js +142 -0
  152. package/dist/esm/core/helpers/ConnectedRawQueryBuilder.js +42 -0
  153. package/dist/esm/core/helpers/ConnectedSelectBuilder.js +327 -0
  154. package/dist/esm/core/helpers/ConnectedTransactionBuilder.js +100 -0
  155. package/dist/esm/core/helpers/ConnectedUpdateBuilder.js +75 -0
  156. package/dist/esm/core/helpers/PaginateBuilder.js +174 -0
  157. package/dist/esm/core/helpers/ReturningExecutor.js +66 -0
  158. package/dist/esm/core/helpers/capability-guard.js +7 -0
  159. package/dist/esm/core/helpers/index.js +13 -0
  160. package/dist/esm/core/helpers/methods.js +6 -0
  161. package/dist/esm/core/helpers/query-convenience.js +194 -0
  162. package/dist/esm/core/helpers/select-joins.js +246 -0
  163. package/dist/esm/core/helpers/select-pagination.js +226 -0
  164. package/dist/esm/core/helpers/select-types.js +1 -0
  165. package/dist/esm/core/pg-family/cockroachdb-client/capabilities.js +28 -0
  166. package/dist/esm/core/pg-family/cockroachdb-client/index.js +2 -0
  167. package/dist/esm/core/pg-family/cockroachdb-client/relq-cockroach.js +12 -0
  168. package/dist/esm/core/pg-family/dsql-client/capabilities.js +28 -0
  169. package/dist/esm/core/pg-family/dsql-client/index.js +2 -0
  170. package/dist/esm/core/pg-family/dsql-client/relq-dsql.js +12 -0
  171. package/dist/esm/core/pg-family/index.js +6 -0
  172. package/dist/esm/core/pg-family/nile-client/capabilities.js +28 -0
  173. package/dist/esm/core/pg-family/nile-client/index.js +2 -0
  174. package/dist/esm/core/pg-family/nile-client/relq-nile.js +32 -0
  175. package/dist/esm/core/pg-family/nile-client/tenant-context.js +40 -0
  176. package/dist/esm/core/pg-family/pg-client/capabilities.js +28 -0
  177. package/dist/esm/core/pg-family/pg-client/index.js +2 -0
  178. package/dist/esm/core/pg-family/pg-client/relq-postgres.js +39 -0
  179. package/dist/esm/core/pg-family/shared/pg-base.js +347 -0
  180. package/dist/esm/core/pg-family/shared/pg-dialect.js +63 -0
  181. package/dist/esm/core/pg-family/shared/pg-error-parser.js +29 -0
  182. package/dist/esm/core/pg-family/shared/pg-type-coercion.js +6 -0
  183. package/dist/esm/core/relq-base.js +270 -0
  184. package/dist/esm/core/relq-client.js +48 -0
  185. package/dist/esm/core/shared/cleanup.js +27 -0
  186. package/dist/esm/core/shared/column-mapping.js +90 -0
  187. package/dist/esm/core/shared/errors.js +13 -0
  188. package/dist/esm/core/shared/index.js +6 -0
  189. package/dist/esm/core/shared/table-accessor.js +19 -0
  190. package/dist/esm/core/shared/transform.js +30 -0
  191. package/dist/esm/core/shared/types.js +1 -0
  192. package/dist/esm/core/shared/validation.js +136 -0
  193. package/dist/esm/core/types/core.types.js +1 -0
  194. package/dist/esm/count/count-builder.js +81 -0
  195. package/dist/esm/count/index.js +1 -0
  196. package/dist/esm/delete/delete-builder.js +169 -0
  197. package/dist/esm/delete/index.js +1 -0
  198. package/dist/esm/explain/explain-builder.js +95 -0
  199. package/dist/esm/explain/index.js +1 -0
  200. package/dist/esm/index.js +7 -0
  201. package/dist/esm/insert/conflict-builder.js +202 -0
  202. package/dist/esm/insert/index.js +1 -0
  203. package/dist/esm/insert/insert-builder.js +313 -0
  204. package/dist/esm/insert/insert-from-select-builder.js +79 -0
  205. package/dist/esm/pubsub/index.js +1 -0
  206. package/dist/esm/pubsub/listen-notify-builder.js +48 -0
  207. package/dist/esm/pubsub/listener-connection.js +173 -0
  208. package/dist/esm/raw/index.js +2 -0
  209. package/dist/esm/raw/raw-query-builder.js +20 -0
  210. package/dist/esm/raw/sql-template.js +66 -0
  211. package/dist/esm/select/aggregate-builder.js +172 -0
  212. package/dist/esm/select/index.js +4 -0
  213. package/dist/esm/select/join-builder.js +184 -0
  214. package/dist/esm/select/join-condition-builder.js +181 -0
  215. package/dist/esm/select/join-internals.js +2 -0
  216. package/dist/esm/select/join-many-condition-builder.js +151 -0
  217. package/dist/esm/select/scalar-query-builder.js +126 -0
  218. package/dist/esm/select/scalar-select-builder.js +70 -0
  219. package/dist/esm/select/select-builder.js +419 -0
  220. package/dist/esm/select/sql-expression.js +33 -0
  221. package/dist/esm/select/table-proxy.js +91 -0
  222. package/dist/esm/shared/aws-dsql.js +140 -0
  223. package/dist/esm/shared/errors/relq-errors.js +339 -0
  224. package/dist/esm/shared/pg-format.js +375 -0
  225. package/dist/esm/shared/types/config-types.js +46 -0
  226. package/dist/esm/transaction/index.js +1 -0
  227. package/dist/esm/transaction/transaction-builder.js +70 -0
  228. package/dist/esm/types/aggregate-types.js +1 -0
  229. package/dist/esm/types/inference-types.js +12 -0
  230. package/dist/esm/types/pagination-types.js +4 -0
  231. package/dist/esm/types/result-types.js +1 -0
  232. package/dist/esm/types/scalar-types.js +1 -0
  233. package/dist/esm/types/schema-types.js +1 -0
  234. package/dist/esm/types/subscription-types.js +1 -0
  235. package/dist/esm/types.js +1 -0
  236. package/dist/esm/update/array-update-builder.js +219 -0
  237. package/dist/esm/update/index.js +3 -0
  238. package/dist/esm/update/jsonb-update-builder.js +211 -0
  239. package/dist/esm/update/update-builder.js +267 -0
  240. package/dist/esm/utils/addon/pg/cursor.js +1 -0
  241. package/dist/esm/utils/addon/pg/pg.js +2 -0
  242. package/dist/esm/utils/case-converter.js +55 -0
  243. package/dist/esm/utils/env-resolver.js +213 -0
  244. package/dist/esm/utils/environment-detection.js +114 -0
  245. package/dist/esm/utils/fk-resolver.js +178 -0
  246. package/dist/esm/utils/index.js +4 -0
  247. package/dist/esm/utils/pool-defaults.js +85 -0
  248. package/dist/esm/utils/type-coercion.js +112 -0
  249. package/dist/esm/window/index.js +1 -0
  250. package/dist/esm/window/window-builder.js +73 -0
  251. package/dist/index.cjs +1 -0
  252. package/dist/index.d.ts +7281 -0
  253. package/dist/index.js +1 -0
  254. package/package.json +52 -0
@@ -0,0 +1,186 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ArrayNumericConditionBuilder = void 0;
4
+ class ArrayNumericConditionBuilder {
5
+ parent;
6
+ constructor(parent) {
7
+ this.parent = parent;
8
+ }
9
+ greaterThan(column, value) {
10
+ this.parent.conditions.push({
11
+ method: 'array_numeric_greater_than',
12
+ column,
13
+ values: { value }
14
+ });
15
+ return this.parent;
16
+ }
17
+ greaterThanOrEqual(column, value) {
18
+ this.parent.conditions.push({
19
+ method: 'array_numeric_greater_than_or_equal',
20
+ column,
21
+ values: { value }
22
+ });
23
+ return this.parent;
24
+ }
25
+ lessThan(column, value) {
26
+ this.parent.conditions.push({
27
+ method: 'array_numeric_less_than',
28
+ column,
29
+ values: { value }
30
+ });
31
+ return this.parent;
32
+ }
33
+ lessThanOrEqual(column, value) {
34
+ this.parent.conditions.push({
35
+ method: 'array_numeric_less_than_or_equal',
36
+ column,
37
+ values: { value }
38
+ });
39
+ return this.parent;
40
+ }
41
+ between(column, min, max) {
42
+ this.parent.conditions.push({
43
+ method: 'array_numeric_between',
44
+ column,
45
+ values: { min, max }
46
+ });
47
+ return this.parent;
48
+ }
49
+ allGreaterThan(column, value) {
50
+ this.parent.conditions.push({
51
+ method: 'array_numeric_all_greater_than',
52
+ column,
53
+ values: { value }
54
+ });
55
+ return this.parent;
56
+ }
57
+ allLessThan(column, value) {
58
+ this.parent.conditions.push({
59
+ method: 'array_numeric_all_less_than',
60
+ column,
61
+ values: { value }
62
+ });
63
+ return this.parent;
64
+ }
65
+ allBetween(column, min, max) {
66
+ this.parent.conditions.push({
67
+ method: 'array_numeric_all_between',
68
+ column,
69
+ values: { min, max }
70
+ });
71
+ return this.parent;
72
+ }
73
+ sumEquals(column, target) {
74
+ this.parent.conditions.push({
75
+ method: 'array_numeric_sum_equals',
76
+ column,
77
+ values: { target }
78
+ });
79
+ return this.parent;
80
+ }
81
+ sumGreaterThan(column, target) {
82
+ this.parent.conditions.push({
83
+ method: 'array_numeric_sum_greater_than',
84
+ column,
85
+ values: { target }
86
+ });
87
+ return this.parent;
88
+ }
89
+ sumLessThan(column, target) {
90
+ this.parent.conditions.push({
91
+ method: 'array_numeric_sum_less_than',
92
+ column,
93
+ values: { target }
94
+ });
95
+ return this.parent;
96
+ }
97
+ avgEquals(column, target) {
98
+ this.parent.conditions.push({
99
+ method: 'array_numeric_avg_equals',
100
+ column,
101
+ values: { target }
102
+ });
103
+ return this.parent;
104
+ }
105
+ avgGreaterThan(column, target) {
106
+ this.parent.conditions.push({
107
+ method: 'array_numeric_avg_greater_than',
108
+ column,
109
+ values: { target }
110
+ });
111
+ return this.parent;
112
+ }
113
+ avgLessThan(column, target) {
114
+ this.parent.conditions.push({
115
+ method: 'array_numeric_avg_less_than',
116
+ column,
117
+ values: { target }
118
+ });
119
+ return this.parent;
120
+ }
121
+ maxEquals(column, target) {
122
+ this.parent.conditions.push({
123
+ method: 'array_numeric_max_equals',
124
+ column,
125
+ values: { target }
126
+ });
127
+ return this.parent;
128
+ }
129
+ minEquals(column, target) {
130
+ this.parent.conditions.push({
131
+ method: 'array_numeric_min_equals',
132
+ column,
133
+ values: { target }
134
+ });
135
+ return this.parent;
136
+ }
137
+ equals(column, value) {
138
+ this.parent.conditions.push({
139
+ method: 'array_numeric_equals',
140
+ column,
141
+ values: { value }
142
+ });
143
+ return this.parent;
144
+ }
145
+ hasEven(column) {
146
+ this.parent.conditions.push({
147
+ method: 'array_numeric_has_even',
148
+ column,
149
+ values: {}
150
+ });
151
+ return this.parent;
152
+ }
153
+ hasOdd(column) {
154
+ this.parent.conditions.push({
155
+ method: 'array_numeric_has_odd',
156
+ column,
157
+ values: {}
158
+ });
159
+ return this.parent;
160
+ }
161
+ hasPositive(column) {
162
+ this.parent.conditions.push({
163
+ method: 'array_numeric_has_positive',
164
+ column,
165
+ values: {}
166
+ });
167
+ return this.parent;
168
+ }
169
+ hasNegative(column) {
170
+ this.parent.conditions.push({
171
+ method: 'array_numeric_has_negative',
172
+ column,
173
+ values: {}
174
+ });
175
+ return this.parent;
176
+ }
177
+ hasZero(column) {
178
+ this.parent.conditions.push({
179
+ method: 'array_numeric_has_zero',
180
+ column,
181
+ values: {}
182
+ });
183
+ return this.parent;
184
+ }
185
+ }
186
+ exports.ArrayNumericConditionBuilder = ArrayNumericConditionBuilder;
@@ -0,0 +1,206 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Jsonb = exports.Date = exports.Uuid = exports.ArrayJsonbConditionBuilder = exports.ArrayDateConditionBuilder = exports.ArrayUuidConditionBuilder = void 0;
4
+ class ArrayUuidConditionBuilder {
5
+ parent;
6
+ constructor(parent) {
7
+ this.parent = parent;
8
+ }
9
+ allValid(column) {
10
+ this.parent.conditions.push({
11
+ method: 'array_uuid_all_valid',
12
+ column,
13
+ values: {}
14
+ });
15
+ return this.parent;
16
+ }
17
+ hasVersion(column, version) {
18
+ this.parent.conditions.push({
19
+ method: 'array_uuid_has_version',
20
+ column,
21
+ values: { version }
22
+ });
23
+ return this.parent;
24
+ }
25
+ equals(column, uuid) {
26
+ this.parent.conditions.push({
27
+ method: 'array_uuid_equals',
28
+ column,
29
+ values: { uuid }
30
+ });
31
+ return this.parent;
32
+ }
33
+ }
34
+ exports.ArrayUuidConditionBuilder = ArrayUuidConditionBuilder;
35
+ exports.Uuid = ArrayUuidConditionBuilder;
36
+ class ArrayDateConditionBuilder {
37
+ parent;
38
+ constructor(parent) {
39
+ this.parent = parent;
40
+ }
41
+ before(column, date) {
42
+ this.parent.conditions.push({
43
+ method: 'array_date_before',
44
+ column,
45
+ values: { date: date instanceof Date ? date.toISOString() : date }
46
+ });
47
+ return this.parent;
48
+ }
49
+ after(column, date) {
50
+ this.parent.conditions.push({
51
+ method: 'array_date_after',
52
+ column,
53
+ values: { date: date instanceof Date ? date.toISOString() : date }
54
+ });
55
+ return this.parent;
56
+ }
57
+ between(column, start, end) {
58
+ this.parent.conditions.push({
59
+ method: 'array_date_between',
60
+ column,
61
+ values: {
62
+ start: start instanceof Date ? start.toISOString() : start,
63
+ end: end instanceof Date ? end.toISOString() : end
64
+ }
65
+ });
66
+ return this.parent;
67
+ }
68
+ withinDays(column, days) {
69
+ this.parent.conditions.push({
70
+ method: 'array_date_within_days',
71
+ column,
72
+ values: { days }
73
+ });
74
+ return this.parent;
75
+ }
76
+ equals(column, date) {
77
+ this.parent.conditions.push({
78
+ method: 'array_date_equals',
79
+ column,
80
+ values: { date: date instanceof Date ? date.toISOString() : date }
81
+ });
82
+ return this.parent;
83
+ }
84
+ hasToday(column) {
85
+ this.parent.conditions.push({
86
+ method: 'array_date_has_today',
87
+ column,
88
+ values: {}
89
+ });
90
+ return this.parent;
91
+ }
92
+ hasPast(column) {
93
+ this.parent.conditions.push({
94
+ method: 'array_date_has_past',
95
+ column,
96
+ values: {}
97
+ });
98
+ return this.parent;
99
+ }
100
+ hasFuture(column) {
101
+ this.parent.conditions.push({
102
+ method: 'array_date_has_future',
103
+ column,
104
+ values: {}
105
+ });
106
+ return this.parent;
107
+ }
108
+ hasThisWeek(column) {
109
+ this.parent.conditions.push({
110
+ method: 'array_date_has_this_week',
111
+ column,
112
+ values: {}
113
+ });
114
+ return this.parent;
115
+ }
116
+ hasThisMonth(column) {
117
+ this.parent.conditions.push({
118
+ method: 'array_date_has_this_month',
119
+ column,
120
+ values: {}
121
+ });
122
+ return this.parent;
123
+ }
124
+ hasThisYear(column) {
125
+ this.parent.conditions.push({
126
+ method: 'array_date_has_this_year',
127
+ column,
128
+ values: {}
129
+ });
130
+ return this.parent;
131
+ }
132
+ }
133
+ exports.ArrayDateConditionBuilder = ArrayDateConditionBuilder;
134
+ exports.Date = ArrayDateConditionBuilder;
135
+ class ArrayJsonbConditionBuilder {
136
+ parent;
137
+ constructor(parent) {
138
+ this.parent = parent;
139
+ }
140
+ hasKey(column, key) {
141
+ this.parent.conditions.push({
142
+ method: 'array_jsonb_has_key',
143
+ column,
144
+ values: { key }
145
+ });
146
+ return this.parent;
147
+ }
148
+ hasPath(column, path) {
149
+ this.parent.conditions.push({
150
+ method: 'array_jsonb_has_path',
151
+ column,
152
+ values: { path }
153
+ });
154
+ return this.parent;
155
+ }
156
+ contains(column, value) {
157
+ this.parent.conditions.push({
158
+ method: 'array_jsonb_contains',
159
+ column,
160
+ values: { value }
161
+ });
162
+ return this.parent;
163
+ }
164
+ containedBy(column, value) {
165
+ this.parent.conditions.push({
166
+ method: 'array_jsonb_contained_by',
167
+ column,
168
+ values: { value }
169
+ });
170
+ return this.parent;
171
+ }
172
+ equals(column, value) {
173
+ this.parent.conditions.push({
174
+ method: 'array_jsonb_equals',
175
+ column,
176
+ values: { value }
177
+ });
178
+ return this.parent;
179
+ }
180
+ pathEquals(column, path, value) {
181
+ this.parent.conditions.push({
182
+ method: 'array_jsonb_path_equals',
183
+ column,
184
+ values: { path, value }
185
+ });
186
+ return this.parent;
187
+ }
188
+ hasObject(column) {
189
+ this.parent.conditions.push({
190
+ method: 'array_jsonb_has_object',
191
+ column,
192
+ values: {}
193
+ });
194
+ return this.parent;
195
+ }
196
+ hasArray(column) {
197
+ this.parent.conditions.push({
198
+ method: 'array_jsonb_has_array',
199
+ column,
200
+ values: {}
201
+ });
202
+ return this.parent;
203
+ }
204
+ }
205
+ exports.ArrayJsonbConditionBuilder = ArrayJsonbConditionBuilder;
206
+ exports.Jsonb = ArrayJsonbConditionBuilder;
@@ -0,0 +1,146 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ArrayStringConditionBuilder = void 0;
4
+ class ArrayStringConditionBuilder {
5
+ parent;
6
+ constructor(parent) {
7
+ this.parent = parent;
8
+ }
9
+ startsWith(column, prefix) {
10
+ this.parent.conditions.push({
11
+ method: 'array_string_starts_with',
12
+ column,
13
+ values: { prefix }
14
+ });
15
+ return this.parent;
16
+ }
17
+ endsWith(column, suffix) {
18
+ this.parent.conditions.push({
19
+ method: 'array_string_ends_with',
20
+ column,
21
+ values: { suffix }
22
+ });
23
+ return this.parent;
24
+ }
25
+ contains(column, substring) {
26
+ this.parent.conditions.push({
27
+ method: 'array_string_contains',
28
+ column,
29
+ values: { substring }
30
+ });
31
+ return this.parent;
32
+ }
33
+ matches(column, pattern) {
34
+ this.parent.conditions.push({
35
+ method: 'array_string_matches',
36
+ column,
37
+ values: { pattern }
38
+ });
39
+ return this.parent;
40
+ }
41
+ imatches(column, pattern) {
42
+ this.parent.conditions.push({
43
+ method: 'array_string_imatches',
44
+ column,
45
+ values: { pattern }
46
+ });
47
+ return this.parent;
48
+ }
49
+ ilike(column, pattern) {
50
+ this.parent.conditions.push({
51
+ method: 'array_string_ilike',
52
+ column,
53
+ values: { pattern }
54
+ });
55
+ return this.parent;
56
+ }
57
+ allStartWith(column, prefix) {
58
+ this.parent.conditions.push({
59
+ method: 'array_string_all_start_with',
60
+ column,
61
+ values: { prefix }
62
+ });
63
+ return this.parent;
64
+ }
65
+ allEndWith(column, suffix) {
66
+ this.parent.conditions.push({
67
+ method: 'array_string_all_end_with',
68
+ column,
69
+ values: { suffix }
70
+ });
71
+ return this.parent;
72
+ }
73
+ allContain(column, substring) {
74
+ this.parent.conditions.push({
75
+ method: 'array_string_all_contain',
76
+ column,
77
+ values: { substring }
78
+ });
79
+ return this.parent;
80
+ }
81
+ lengthBetween(column, min, max) {
82
+ this.parent.conditions.push({
83
+ method: 'array_string_length_between',
84
+ column,
85
+ values: { min, max }
86
+ });
87
+ return this.parent;
88
+ }
89
+ hasEmpty(column) {
90
+ this.parent.conditions.push({
91
+ method: 'array_string_has_empty',
92
+ column,
93
+ values: {}
94
+ });
95
+ return this.parent;
96
+ }
97
+ hasNonEmpty(column) {
98
+ this.parent.conditions.push({
99
+ method: 'array_string_has_non_empty',
100
+ column,
101
+ values: {}
102
+ });
103
+ return this.parent;
104
+ }
105
+ hasUppercase(column) {
106
+ this.parent.conditions.push({
107
+ method: 'array_string_has_uppercase',
108
+ column,
109
+ values: {}
110
+ });
111
+ return this.parent;
112
+ }
113
+ hasLowercase(column) {
114
+ this.parent.conditions.push({
115
+ method: 'array_string_has_lowercase',
116
+ column,
117
+ values: {}
118
+ });
119
+ return this.parent;
120
+ }
121
+ hasNumeric(column) {
122
+ this.parent.conditions.push({
123
+ method: 'array_string_has_numeric',
124
+ column,
125
+ values: {}
126
+ });
127
+ return this.parent;
128
+ }
129
+ equals(column, value) {
130
+ this.parent.conditions.push({
131
+ method: 'array_string_equals',
132
+ column,
133
+ values: { value }
134
+ });
135
+ return this.parent;
136
+ }
137
+ iequals(column, value) {
138
+ this.parent.conditions.push({
139
+ method: 'array_string_iequals',
140
+ column,
141
+ values: { value }
142
+ });
143
+ return this.parent;
144
+ }
145
+ }
146
+ exports.ArrayStringConditionBuilder = ArrayStringConditionBuilder;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });