@mrnafisia/type-query 1.0.38 → 1.0.39

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 (47) hide show
  1. package/README.md +2 -2
  2. package/dist/U.d.ts +2 -2
  3. package/dist/U.js +27 -27
  4. package/dist/context.d.ts +987 -5
  5. package/dist/context.d.ts.map +1 -1
  6. package/dist/context.js +85 -85
  7. package/dist/dictionary.d.ts +12 -12
  8. package/dist/dictionary.js +179 -179
  9. package/dist/entity.d.ts +3474 -3306
  10. package/dist/entity.d.ts.map +1 -1
  11. package/dist/entity.js +961 -960
  12. package/dist/entity.js.map +1 -1
  13. package/dist/error.d.ts +4 -4
  14. package/dist/error.js +6 -6
  15. package/dist/index.d.ts +36 -36
  16. package/dist/index.js +60 -60
  17. package/dist/model.d.ts +1005 -1005
  18. package/dist/model.js +282 -282
  19. package/dist/parser.d.ts +11 -11
  20. package/dist/parser.js +120 -120
  21. package/dist/pool.d.ts +5 -5
  22. package/dist/pool.js +121 -121
  23. package/dist/schema.d.ts +25 -25
  24. package/dist/schema.js +395 -395
  25. package/dist/testUtil.d.ts +4 -4
  26. package/dist/testUtil.js +330 -330
  27. package/dist/types/context.d.ts +55 -55
  28. package/dist/types/context.js +2 -2
  29. package/dist/types/entity.d.ts +70 -70
  30. package/dist/types/entity.js +2 -2
  31. package/dist/types/json.d.ts +8 -8
  32. package/dist/types/json.js +2 -2
  33. package/dist/types/model.d.ts +23 -23
  34. package/dist/types/model.js +2 -2
  35. package/dist/types/pool.d.ts +18 -18
  36. package/dist/types/pool.js +2 -2
  37. package/dist/types/postgres.d.ts +9 -9
  38. package/dist/types/postgres.js +2 -2
  39. package/dist/types/table.d.ts +234 -234
  40. package/dist/types/table.js +2 -2
  41. package/dist/types/testUtil.d.ts +26 -26
  42. package/dist/types/testUtil.js +2 -2
  43. package/dist/utils.d.ts +67 -67
  44. package/dist/utils.d.ts.map +1 -1
  45. package/dist/utils.js +220 -216
  46. package/dist/utils.js.map +1 -1
  47. package/package.json +39 -39
package/dist/context.d.ts CHANGED
@@ -1,6 +1,988 @@
1
- import Table from './types/table';
2
- import { Context, ContextScope } from './types/context';
3
- declare const createContext: <T extends Table>(table: T, alias?: string) => Context<T["columns"]>;
4
- declare const createContextScopeHelper: <T extends Table>(table: T) => (rules: T["columns"] extends infer T_1 ? { [columnKey in keyof T_1]?: [op: null extends import("./types/postgres").PostgresTypeMapper<T["columns"][columnKey]["type"], T["columns"][columnKey]["nullable"]> ? import("./types/context").NullOperator : never] | [op: import("./types/postgres").PostgresTypeMapper<T["columns"][columnKey]["type"], T["columns"][columnKey]["nullable"]> extends boolean ? import("./types/context").BooleanOperator : never] | [op: import("./types/context").CompareOperatorCompatible<import("./types/postgres").PostgresTypeMapper<T["columns"][columnKey]["type"], T["columns"][columnKey]["nullable"]>, import("./types/context").CompareOperator, never>, v: import("./types/entity").Expression<import("./types/postgres").PostgresTypeMapper<T["columns"][columnKey]["type"], T["columns"][columnKey]["nullable"]>>] | [op: import("./types/context").ListOperatorCompatible<import("./types/postgres").PostgresTypeMapper<T["columns"][columnKey]["type"], T["columns"][columnKey]["nullable"]>, import("./types/context").ListOperator, never>, v: import("./types/entity").Expression<import("./types/postgres").PostgresTypeMapper<T["columns"][columnKey]["type"], T["columns"][columnKey]["nullable"]>>[] | undefined] | [op: "like", v: import("./types/postgres").PostgresTypeMapper<T["columns"][columnKey]["type"], T["columns"][columnKey]["nullable"]> extends string ? import("./types/entity").Expression<string & import("./types/postgres").PostgresTypeMapper<T["columns"][columnKey]["type"], T["columns"][columnKey]["nullable"]>> : never] | [op: "like all" | "like some", v: import("./types/postgres").PostgresTypeMapper<T["columns"][columnKey]["type"], T["columns"][columnKey]["nullable"]> extends string ? import("./types/entity").Expression<string & import("./types/postgres").PostgresTypeMapper<T["columns"][columnKey]["type"], T["columns"][columnKey]["nullable"]>>[] | undefined : never] | [op: "@>" | "<@", v: import("./types/postgres").PostgresTypeMapper<T["columns"][columnKey]["type"], T["columns"][columnKey]["nullable"]> extends import("./types/json").JSON ? import("./types/entity").Expression<import("./types/json").JSON & import("./types/postgres").PostgresTypeMapper<T["columns"][columnKey]["type"], T["columns"][columnKey]["nullable"]>> : never] | [op: "?", v: import("./types/postgres").PostgresTypeMapper<T["columns"][columnKey]["type"], T["columns"][columnKey]["nullable"]> extends import("./types/json").JSON ? import("./types/entity").Expression<string> : never] | [op: "?|" | "?&", v: import("./types/postgres").PostgresTypeMapper<T["columns"][columnKey]["type"], T["columns"][columnKey]["nullable"]> extends import("./types/json").JSON ? import("./types/entity").Expression<string>[] | undefined : never]; } : never, alias: string) => import("./types/entity").ValueExpression<boolean>[];
5
- export { createContext, createContextScopeHelper };
1
+ import Table from './types/table';
2
+ import { Context, ContextScope } from './types/context';
3
+ declare const createContext: <T extends Table>(table: T, alias?: string) => Context<T["columns"]>;
4
+ declare const createContextScopeHelper: <T extends Table>(table: T) => (rules: T["columns"] extends infer T_1 extends {
5
+ [key: string]: ({
6
+ type: import("./types/postgres").PostgresType;
7
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
8
+ nullable: boolean;
9
+ title?: string;
10
+ reference?: {
11
+ table: Table;
12
+ onUpdate?: import("./types/table").ReferenceActions;
13
+ onDelete?: import("./types/table").ReferenceActions;
14
+ column: string;
15
+ };
16
+ } & {
17
+ primary?: true;
18
+ nullable: false;
19
+ } & {
20
+ type: "boolean" | "text" | "uuid" | "date" | "json" | "jsonb";
21
+ } & {
22
+ default: false;
23
+ }) | ({
24
+ type: import("./types/postgres").PostgresType;
25
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
26
+ nullable: boolean;
27
+ title?: string;
28
+ reference?: {
29
+ table: Table;
30
+ onUpdate?: import("./types/table").ReferenceActions;
31
+ onDelete?: import("./types/table").ReferenceActions;
32
+ column: string;
33
+ };
34
+ } & {
35
+ primary?: true;
36
+ nullable: false;
37
+ } & {
38
+ type: "boolean" | "text" | "uuid" | "date" | "json" | "jsonb";
39
+ } & {
40
+ default: true;
41
+ value: string;
42
+ }) | ({
43
+ type: import("./types/postgres").PostgresType;
44
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
45
+ nullable: boolean;
46
+ title?: string;
47
+ reference?: {
48
+ table: Table;
49
+ onUpdate?: import("./types/table").ReferenceActions;
50
+ onDelete?: import("./types/table").ReferenceActions;
51
+ column: string;
52
+ };
53
+ } & {
54
+ primary?: true;
55
+ nullable: false;
56
+ } & {
57
+ type: "boolean" | "text" | "uuid" | "date" | "json" | "jsonb";
58
+ } & {
59
+ default: "value";
60
+ type: "boolean";
61
+ value: boolean;
62
+ }) | ({
63
+ type: import("./types/postgres").PostgresType;
64
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
65
+ nullable: boolean;
66
+ title?: string;
67
+ reference?: {
68
+ table: Table;
69
+ onUpdate?: import("./types/table").ReferenceActions;
70
+ onDelete?: import("./types/table").ReferenceActions;
71
+ column: string;
72
+ };
73
+ } & {
74
+ primary?: true;
75
+ nullable: false;
76
+ } & {
77
+ type: "boolean" | "text" | "uuid" | "date" | "json" | "jsonb";
78
+ } & {
79
+ default: "value";
80
+ type: "character" | "character varying" | "text" | "uuid";
81
+ value: string;
82
+ }) | ({
83
+ type: import("./types/postgres").PostgresType;
84
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
85
+ nullable: boolean;
86
+ title?: string;
87
+ reference?: {
88
+ table: Table;
89
+ onUpdate?: import("./types/table").ReferenceActions;
90
+ onDelete?: import("./types/table").ReferenceActions;
91
+ column: string;
92
+ };
93
+ } & {
94
+ primary?: true;
95
+ nullable: false;
96
+ } & {
97
+ type: "boolean" | "text" | "uuid" | "date" | "json" | "jsonb";
98
+ } & {
99
+ default: "value";
100
+ type: "date" | "timestamp without time zone" | "timestamp with time zone";
101
+ value: Date;
102
+ }) | ({
103
+ type: import("./types/postgres").PostgresType;
104
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
105
+ nullable: boolean;
106
+ title?: string;
107
+ reference?: {
108
+ table: Table;
109
+ onUpdate?: import("./types/table").ReferenceActions;
110
+ onDelete?: import("./types/table").ReferenceActions;
111
+ column: string;
112
+ };
113
+ } & {
114
+ primary?: true;
115
+ nullable: false;
116
+ } & {
117
+ type: "boolean" | "text" | "uuid" | "date" | "json" | "jsonb";
118
+ } & {
119
+ default: "value";
120
+ type: "json" | "jsonb";
121
+ value: import("./types/json").JSON;
122
+ }) | ({
123
+ type: import("./types/postgres").PostgresType;
124
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
125
+ nullable: boolean;
126
+ title?: string;
127
+ reference?: {
128
+ table: Table;
129
+ onUpdate?: import("./types/table").ReferenceActions;
130
+ onDelete?: import("./types/table").ReferenceActions;
131
+ column: string;
132
+ };
133
+ } & {
134
+ primary?: true;
135
+ nullable: false;
136
+ } & {
137
+ type: "smallint" | "integer" | "real" | "double precision";
138
+ min?: number;
139
+ max?: number;
140
+ } & {
141
+ default: false;
142
+ }) | ({
143
+ type: import("./types/postgres").PostgresType;
144
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
145
+ nullable: boolean;
146
+ title?: string;
147
+ reference?: {
148
+ table: Table;
149
+ onUpdate?: import("./types/table").ReferenceActions;
150
+ onDelete?: import("./types/table").ReferenceActions;
151
+ column: string;
152
+ };
153
+ } & {
154
+ primary?: true;
155
+ nullable: false;
156
+ } & {
157
+ type: "smallint" | "integer" | "real" | "double precision";
158
+ min?: number;
159
+ max?: number;
160
+ } & {
161
+ default: true;
162
+ value: string;
163
+ }) | ({
164
+ type: import("./types/postgres").PostgresType;
165
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
166
+ nullable: boolean;
167
+ title?: string;
168
+ reference?: {
169
+ table: Table;
170
+ onUpdate?: import("./types/table").ReferenceActions;
171
+ onDelete?: import("./types/table").ReferenceActions;
172
+ column: string;
173
+ };
174
+ } & {
175
+ primary?: true;
176
+ nullable: false;
177
+ } & {
178
+ type: "smallint" | "integer" | "real" | "double precision";
179
+ min?: number;
180
+ max?: number;
181
+ } & {
182
+ default: "auto-increment";
183
+ type: "bigint" | "smallint" | "integer";
184
+ seqTitle?: string;
185
+ }) | ({
186
+ type: import("./types/postgres").PostgresType;
187
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
188
+ nullable: boolean;
189
+ title?: string;
190
+ reference?: {
191
+ table: Table;
192
+ onUpdate?: import("./types/table").ReferenceActions;
193
+ onDelete?: import("./types/table").ReferenceActions;
194
+ column: string;
195
+ };
196
+ } & {
197
+ primary?: true;
198
+ nullable: false;
199
+ } & {
200
+ type: "smallint" | "integer" | "real" | "double precision";
201
+ min?: number;
202
+ max?: number;
203
+ } & {
204
+ default: "value";
205
+ type: "smallint" | "integer" | "real" | "double precision";
206
+ value: number;
207
+ }) | ({
208
+ type: import("./types/postgres").PostgresType;
209
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
210
+ nullable: boolean;
211
+ title?: string;
212
+ reference?: {
213
+ table: Table;
214
+ onUpdate?: import("./types/table").ReferenceActions;
215
+ onDelete?: import("./types/table").ReferenceActions;
216
+ column: string;
217
+ };
218
+ } & {
219
+ primary?: true;
220
+ nullable: false;
221
+ } & {
222
+ type: "bigint";
223
+ min?: bigint;
224
+ max?: bigint;
225
+ } & {
226
+ default: false;
227
+ }) | ({
228
+ type: import("./types/postgres").PostgresType;
229
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
230
+ nullable: boolean;
231
+ title?: string;
232
+ reference?: {
233
+ table: Table;
234
+ onUpdate?: import("./types/table").ReferenceActions;
235
+ onDelete?: import("./types/table").ReferenceActions;
236
+ column: string;
237
+ };
238
+ } & {
239
+ primary?: true;
240
+ nullable: false;
241
+ } & {
242
+ type: "bigint";
243
+ min?: bigint;
244
+ max?: bigint;
245
+ } & {
246
+ default: true;
247
+ value: string;
248
+ }) | ({
249
+ type: import("./types/postgres").PostgresType;
250
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
251
+ nullable: boolean;
252
+ title?: string;
253
+ reference?: {
254
+ table: Table;
255
+ onUpdate?: import("./types/table").ReferenceActions;
256
+ onDelete?: import("./types/table").ReferenceActions;
257
+ column: string;
258
+ };
259
+ } & {
260
+ primary?: true;
261
+ nullable: false;
262
+ } & {
263
+ type: "bigint";
264
+ min?: bigint;
265
+ max?: bigint;
266
+ } & {
267
+ default: "auto-increment";
268
+ type: "bigint" | "smallint" | "integer";
269
+ seqTitle?: string;
270
+ }) | ({
271
+ type: import("./types/postgres").PostgresType;
272
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
273
+ nullable: boolean;
274
+ title?: string;
275
+ reference?: {
276
+ table: Table;
277
+ onUpdate?: import("./types/table").ReferenceActions;
278
+ onDelete?: import("./types/table").ReferenceActions;
279
+ column: string;
280
+ };
281
+ } & {
282
+ primary?: true;
283
+ nullable: false;
284
+ } & {
285
+ type: "bigint";
286
+ min?: bigint;
287
+ max?: bigint;
288
+ } & {
289
+ default: "value";
290
+ type: "bigint";
291
+ value: bigint;
292
+ }) | ({
293
+ type: import("./types/postgres").PostgresType;
294
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
295
+ nullable: boolean;
296
+ title?: string;
297
+ reference?: {
298
+ table: Table;
299
+ onUpdate?: import("./types/table").ReferenceActions;
300
+ onDelete?: import("./types/table").ReferenceActions;
301
+ column: string;
302
+ };
303
+ } & {
304
+ primary?: true;
305
+ nullable: false;
306
+ } & {
307
+ type: "numeric";
308
+ precision: number;
309
+ scale: number;
310
+ min?: import("decimal.js").default;
311
+ max?: import("decimal.js").default;
312
+ } & {
313
+ default: false;
314
+ }) | ({
315
+ type: import("./types/postgres").PostgresType;
316
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
317
+ nullable: boolean;
318
+ title?: string;
319
+ reference?: {
320
+ table: Table;
321
+ onUpdate?: import("./types/table").ReferenceActions;
322
+ onDelete?: import("./types/table").ReferenceActions;
323
+ column: string;
324
+ };
325
+ } & {
326
+ primary?: true;
327
+ nullable: false;
328
+ } & {
329
+ type: "numeric";
330
+ precision: number;
331
+ scale: number;
332
+ min?: import("decimal.js").default;
333
+ max?: import("decimal.js").default;
334
+ } & {
335
+ default: true;
336
+ value: string;
337
+ }) | ({
338
+ type: import("./types/postgres").PostgresType;
339
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
340
+ nullable: boolean;
341
+ title?: string;
342
+ reference?: {
343
+ table: Table;
344
+ onUpdate?: import("./types/table").ReferenceActions;
345
+ onDelete?: import("./types/table").ReferenceActions;
346
+ column: string;
347
+ };
348
+ } & {
349
+ primary?: true;
350
+ nullable: false;
351
+ } & {
352
+ type: "numeric";
353
+ precision: number;
354
+ scale: number;
355
+ min?: import("decimal.js").default;
356
+ max?: import("decimal.js").default;
357
+ } & {
358
+ default: "value";
359
+ type: "numeric";
360
+ value: import("decimal.js").default;
361
+ }) | ({
362
+ type: import("./types/postgres").PostgresType;
363
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
364
+ nullable: boolean;
365
+ title?: string;
366
+ reference?: {
367
+ table: Table;
368
+ onUpdate?: import("./types/table").ReferenceActions;
369
+ onDelete?: import("./types/table").ReferenceActions;
370
+ column: string;
371
+ };
372
+ } & {
373
+ primary?: true;
374
+ nullable: false;
375
+ } & {
376
+ type: "character" | "character varying";
377
+ minLength?: number;
378
+ maxLength?: number;
379
+ regex?: RegExp;
380
+ } & {
381
+ default: false;
382
+ }) | ({
383
+ type: import("./types/postgres").PostgresType;
384
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
385
+ nullable: boolean;
386
+ title?: string;
387
+ reference?: {
388
+ table: Table;
389
+ onUpdate?: import("./types/table").ReferenceActions;
390
+ onDelete?: import("./types/table").ReferenceActions;
391
+ column: string;
392
+ };
393
+ } & {
394
+ primary?: true;
395
+ nullable: false;
396
+ } & {
397
+ type: "character" | "character varying";
398
+ minLength?: number;
399
+ maxLength?: number;
400
+ regex?: RegExp;
401
+ } & {
402
+ default: true;
403
+ value: string;
404
+ }) | ({
405
+ type: import("./types/postgres").PostgresType;
406
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
407
+ nullable: boolean;
408
+ title?: string;
409
+ reference?: {
410
+ table: Table;
411
+ onUpdate?: import("./types/table").ReferenceActions;
412
+ onDelete?: import("./types/table").ReferenceActions;
413
+ column: string;
414
+ };
415
+ } & {
416
+ primary?: true;
417
+ nullable: false;
418
+ } & {
419
+ type: "character" | "character varying";
420
+ minLength?: number;
421
+ maxLength?: number;
422
+ regex?: RegExp;
423
+ } & {
424
+ default: "value";
425
+ type: "character" | "character varying" | "text" | "uuid";
426
+ value: string;
427
+ }) | ({
428
+ type: import("./types/postgres").PostgresType;
429
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
430
+ nullable: boolean;
431
+ title?: string;
432
+ reference?: {
433
+ table: Table;
434
+ onUpdate?: import("./types/table").ReferenceActions;
435
+ onDelete?: import("./types/table").ReferenceActions;
436
+ column: string;
437
+ };
438
+ } & {
439
+ primary?: true;
440
+ nullable: false;
441
+ } & {
442
+ type: "timestamp without time zone" | "timestamp with time zone";
443
+ length?: number;
444
+ } & {
445
+ default: false;
446
+ }) | ({
447
+ type: import("./types/postgres").PostgresType;
448
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
449
+ nullable: boolean;
450
+ title?: string;
451
+ reference?: {
452
+ table: Table;
453
+ onUpdate?: import("./types/table").ReferenceActions;
454
+ onDelete?: import("./types/table").ReferenceActions;
455
+ column: string;
456
+ };
457
+ } & {
458
+ primary?: true;
459
+ nullable: false;
460
+ } & {
461
+ type: "timestamp without time zone" | "timestamp with time zone";
462
+ length?: number;
463
+ } & {
464
+ default: true;
465
+ value: string;
466
+ }) | ({
467
+ type: import("./types/postgres").PostgresType;
468
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
469
+ nullable: boolean;
470
+ title?: string;
471
+ reference?: {
472
+ table: Table;
473
+ onUpdate?: import("./types/table").ReferenceActions;
474
+ onDelete?: import("./types/table").ReferenceActions;
475
+ column: string;
476
+ };
477
+ } & {
478
+ primary?: true;
479
+ nullable: false;
480
+ } & {
481
+ type: "timestamp without time zone" | "timestamp with time zone";
482
+ length?: number;
483
+ } & {
484
+ default: "created-at" | "updated-at";
485
+ type: "timestamp without time zone" | "timestamp with time zone";
486
+ }) | ({
487
+ type: import("./types/postgres").PostgresType;
488
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
489
+ nullable: boolean;
490
+ title?: string;
491
+ reference?: {
492
+ table: Table;
493
+ onUpdate?: import("./types/table").ReferenceActions;
494
+ onDelete?: import("./types/table").ReferenceActions;
495
+ column: string;
496
+ };
497
+ } & {
498
+ primary?: true;
499
+ nullable: false;
500
+ } & {
501
+ type: "timestamp without time zone" | "timestamp with time zone";
502
+ length?: number;
503
+ } & {
504
+ default: "value";
505
+ type: "date" | "timestamp without time zone" | "timestamp with time zone";
506
+ value: Date;
507
+ }) | ({
508
+ type: import("./types/postgres").PostgresType;
509
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
510
+ nullable: boolean;
511
+ title?: string;
512
+ reference?: {
513
+ table: Table;
514
+ onUpdate?: import("./types/table").ReferenceActions;
515
+ onDelete?: import("./types/table").ReferenceActions;
516
+ column: string;
517
+ };
518
+ } & {
519
+ nullable: true;
520
+ } & {
521
+ type: "boolean" | "text" | "uuid" | "date" | "json" | "jsonb";
522
+ } & {
523
+ default: false;
524
+ }) | ({
525
+ type: import("./types/postgres").PostgresType;
526
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
527
+ nullable: boolean;
528
+ title?: string;
529
+ reference?: {
530
+ table: Table;
531
+ onUpdate?: import("./types/table").ReferenceActions;
532
+ onDelete?: import("./types/table").ReferenceActions;
533
+ column: string;
534
+ };
535
+ } & {
536
+ nullable: true;
537
+ } & {
538
+ type: "boolean" | "text" | "uuid" | "date" | "json" | "jsonb";
539
+ } & {
540
+ default: true;
541
+ value: string;
542
+ }) | ({
543
+ type: import("./types/postgres").PostgresType;
544
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
545
+ nullable: boolean;
546
+ title?: string;
547
+ reference?: {
548
+ table: Table;
549
+ onUpdate?: import("./types/table").ReferenceActions;
550
+ onDelete?: import("./types/table").ReferenceActions;
551
+ column: string;
552
+ };
553
+ } & {
554
+ nullable: true;
555
+ } & {
556
+ type: "boolean" | "text" | "uuid" | "date" | "json" | "jsonb";
557
+ } & {
558
+ default: "value";
559
+ type: "boolean";
560
+ value: boolean;
561
+ }) | ({
562
+ type: import("./types/postgres").PostgresType;
563
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
564
+ nullable: boolean;
565
+ title?: string;
566
+ reference?: {
567
+ table: Table;
568
+ onUpdate?: import("./types/table").ReferenceActions;
569
+ onDelete?: import("./types/table").ReferenceActions;
570
+ column: string;
571
+ };
572
+ } & {
573
+ nullable: true;
574
+ } & {
575
+ type: "boolean" | "text" | "uuid" | "date" | "json" | "jsonb";
576
+ } & {
577
+ default: "value";
578
+ type: "character" | "character varying" | "text" | "uuid";
579
+ value: string;
580
+ }) | ({
581
+ type: import("./types/postgres").PostgresType;
582
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
583
+ nullable: boolean;
584
+ title?: string;
585
+ reference?: {
586
+ table: Table;
587
+ onUpdate?: import("./types/table").ReferenceActions;
588
+ onDelete?: import("./types/table").ReferenceActions;
589
+ column: string;
590
+ };
591
+ } & {
592
+ nullable: true;
593
+ } & {
594
+ type: "boolean" | "text" | "uuid" | "date" | "json" | "jsonb";
595
+ } & {
596
+ default: "value";
597
+ type: "date" | "timestamp without time zone" | "timestamp with time zone";
598
+ value: Date;
599
+ }) | ({
600
+ type: import("./types/postgres").PostgresType;
601
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
602
+ nullable: boolean;
603
+ title?: string;
604
+ reference?: {
605
+ table: Table;
606
+ onUpdate?: import("./types/table").ReferenceActions;
607
+ onDelete?: import("./types/table").ReferenceActions;
608
+ column: string;
609
+ };
610
+ } & {
611
+ nullable: true;
612
+ } & {
613
+ type: "boolean" | "text" | "uuid" | "date" | "json" | "jsonb";
614
+ } & {
615
+ default: "value";
616
+ type: "json" | "jsonb";
617
+ value: import("./types/json").JSON;
618
+ }) | ({
619
+ type: import("./types/postgres").PostgresType;
620
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
621
+ nullable: boolean;
622
+ title?: string;
623
+ reference?: {
624
+ table: Table;
625
+ onUpdate?: import("./types/table").ReferenceActions;
626
+ onDelete?: import("./types/table").ReferenceActions;
627
+ column: string;
628
+ };
629
+ } & {
630
+ nullable: true;
631
+ } & {
632
+ type: "smallint" | "integer" | "real" | "double precision";
633
+ min?: number;
634
+ max?: number;
635
+ } & {
636
+ default: false;
637
+ }) | ({
638
+ type: import("./types/postgres").PostgresType;
639
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
640
+ nullable: boolean;
641
+ title?: string;
642
+ reference?: {
643
+ table: Table;
644
+ onUpdate?: import("./types/table").ReferenceActions;
645
+ onDelete?: import("./types/table").ReferenceActions;
646
+ column: string;
647
+ };
648
+ } & {
649
+ nullable: true;
650
+ } & {
651
+ type: "smallint" | "integer" | "real" | "double precision";
652
+ min?: number;
653
+ max?: number;
654
+ } & {
655
+ default: true;
656
+ value: string;
657
+ }) | ({
658
+ type: import("./types/postgres").PostgresType;
659
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
660
+ nullable: boolean;
661
+ title?: string;
662
+ reference?: {
663
+ table: Table;
664
+ onUpdate?: import("./types/table").ReferenceActions;
665
+ onDelete?: import("./types/table").ReferenceActions;
666
+ column: string;
667
+ };
668
+ } & {
669
+ nullable: true;
670
+ } & {
671
+ type: "smallint" | "integer" | "real" | "double precision";
672
+ min?: number;
673
+ max?: number;
674
+ } & {
675
+ default: "auto-increment";
676
+ type: "bigint" | "smallint" | "integer";
677
+ seqTitle?: string;
678
+ }) | ({
679
+ type: import("./types/postgres").PostgresType;
680
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
681
+ nullable: boolean;
682
+ title?: string;
683
+ reference?: {
684
+ table: Table;
685
+ onUpdate?: import("./types/table").ReferenceActions;
686
+ onDelete?: import("./types/table").ReferenceActions;
687
+ column: string;
688
+ };
689
+ } & {
690
+ nullable: true;
691
+ } & {
692
+ type: "smallint" | "integer" | "real" | "double precision";
693
+ min?: number;
694
+ max?: number;
695
+ } & {
696
+ default: "value";
697
+ type: "smallint" | "integer" | "real" | "double precision";
698
+ value: number;
699
+ }) | ({
700
+ type: import("./types/postgres").PostgresType;
701
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
702
+ nullable: boolean;
703
+ title?: string;
704
+ reference?: {
705
+ table: Table;
706
+ onUpdate?: import("./types/table").ReferenceActions;
707
+ onDelete?: import("./types/table").ReferenceActions;
708
+ column: string;
709
+ };
710
+ } & {
711
+ nullable: true;
712
+ } & {
713
+ type: "bigint";
714
+ min?: bigint;
715
+ max?: bigint;
716
+ } & {
717
+ default: false;
718
+ }) | ({
719
+ type: import("./types/postgres").PostgresType;
720
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
721
+ nullable: boolean;
722
+ title?: string;
723
+ reference?: {
724
+ table: Table;
725
+ onUpdate?: import("./types/table").ReferenceActions;
726
+ onDelete?: import("./types/table").ReferenceActions;
727
+ column: string;
728
+ };
729
+ } & {
730
+ nullable: true;
731
+ } & {
732
+ type: "bigint";
733
+ min?: bigint;
734
+ max?: bigint;
735
+ } & {
736
+ default: true;
737
+ value: string;
738
+ }) | ({
739
+ type: import("./types/postgres").PostgresType;
740
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
741
+ nullable: boolean;
742
+ title?: string;
743
+ reference?: {
744
+ table: Table;
745
+ onUpdate?: import("./types/table").ReferenceActions;
746
+ onDelete?: import("./types/table").ReferenceActions;
747
+ column: string;
748
+ };
749
+ } & {
750
+ nullable: true;
751
+ } & {
752
+ type: "bigint";
753
+ min?: bigint;
754
+ max?: bigint;
755
+ } & {
756
+ default: "auto-increment";
757
+ type: "bigint" | "smallint" | "integer";
758
+ seqTitle?: string;
759
+ }) | ({
760
+ type: import("./types/postgres").PostgresType;
761
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
762
+ nullable: boolean;
763
+ title?: string;
764
+ reference?: {
765
+ table: Table;
766
+ onUpdate?: import("./types/table").ReferenceActions;
767
+ onDelete?: import("./types/table").ReferenceActions;
768
+ column: string;
769
+ };
770
+ } & {
771
+ nullable: true;
772
+ } & {
773
+ type: "bigint";
774
+ min?: bigint;
775
+ max?: bigint;
776
+ } & {
777
+ default: "value";
778
+ type: "bigint";
779
+ value: bigint;
780
+ }) | ({
781
+ type: import("./types/postgres").PostgresType;
782
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
783
+ nullable: boolean;
784
+ title?: string;
785
+ reference?: {
786
+ table: Table;
787
+ onUpdate?: import("./types/table").ReferenceActions;
788
+ onDelete?: import("./types/table").ReferenceActions;
789
+ column: string;
790
+ };
791
+ } & {
792
+ nullable: true;
793
+ } & {
794
+ type: "numeric";
795
+ precision: number;
796
+ scale: number;
797
+ min?: import("decimal.js").default;
798
+ max?: import("decimal.js").default;
799
+ } & {
800
+ default: false;
801
+ }) | ({
802
+ type: import("./types/postgres").PostgresType;
803
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
804
+ nullable: boolean;
805
+ title?: string;
806
+ reference?: {
807
+ table: Table;
808
+ onUpdate?: import("./types/table").ReferenceActions;
809
+ onDelete?: import("./types/table").ReferenceActions;
810
+ column: string;
811
+ };
812
+ } & {
813
+ nullable: true;
814
+ } & {
815
+ type: "numeric";
816
+ precision: number;
817
+ scale: number;
818
+ min?: import("decimal.js").default;
819
+ max?: import("decimal.js").default;
820
+ } & {
821
+ default: true;
822
+ value: string;
823
+ }) | ({
824
+ type: import("./types/postgres").PostgresType;
825
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
826
+ nullable: boolean;
827
+ title?: string;
828
+ reference?: {
829
+ table: Table;
830
+ onUpdate?: import("./types/table").ReferenceActions;
831
+ onDelete?: import("./types/table").ReferenceActions;
832
+ column: string;
833
+ };
834
+ } & {
835
+ nullable: true;
836
+ } & {
837
+ type: "numeric";
838
+ precision: number;
839
+ scale: number;
840
+ min?: import("decimal.js").default;
841
+ max?: import("decimal.js").default;
842
+ } & {
843
+ default: "value";
844
+ type: "numeric";
845
+ value: import("decimal.js").default;
846
+ }) | ({
847
+ type: import("./types/postgres").PostgresType;
848
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
849
+ nullable: boolean;
850
+ title?: string;
851
+ reference?: {
852
+ table: Table;
853
+ onUpdate?: import("./types/table").ReferenceActions;
854
+ onDelete?: import("./types/table").ReferenceActions;
855
+ column: string;
856
+ };
857
+ } & {
858
+ nullable: true;
859
+ } & {
860
+ type: "character" | "character varying";
861
+ minLength?: number;
862
+ maxLength?: number;
863
+ regex?: RegExp;
864
+ } & {
865
+ default: false;
866
+ }) | ({
867
+ type: import("./types/postgres").PostgresType;
868
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
869
+ nullable: boolean;
870
+ title?: string;
871
+ reference?: {
872
+ table: Table;
873
+ onUpdate?: import("./types/table").ReferenceActions;
874
+ onDelete?: import("./types/table").ReferenceActions;
875
+ column: string;
876
+ };
877
+ } & {
878
+ nullable: true;
879
+ } & {
880
+ type: "character" | "character varying";
881
+ minLength?: number;
882
+ maxLength?: number;
883
+ regex?: RegExp;
884
+ } & {
885
+ default: true;
886
+ value: string;
887
+ }) | ({
888
+ type: import("./types/postgres").PostgresType;
889
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
890
+ nullable: boolean;
891
+ title?: string;
892
+ reference?: {
893
+ table: Table;
894
+ onUpdate?: import("./types/table").ReferenceActions;
895
+ onDelete?: import("./types/table").ReferenceActions;
896
+ column: string;
897
+ };
898
+ } & {
899
+ nullable: true;
900
+ } & {
901
+ type: "character" | "character varying";
902
+ minLength?: number;
903
+ maxLength?: number;
904
+ regex?: RegExp;
905
+ } & {
906
+ default: "value";
907
+ type: "character" | "character varying" | "text" | "uuid";
908
+ value: string;
909
+ }) | ({
910
+ type: import("./types/postgres").PostgresType;
911
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
912
+ nullable: boolean;
913
+ title?: string;
914
+ reference?: {
915
+ table: Table;
916
+ onUpdate?: import("./types/table").ReferenceActions;
917
+ onDelete?: import("./types/table").ReferenceActions;
918
+ column: string;
919
+ };
920
+ } & {
921
+ nullable: true;
922
+ } & {
923
+ type: "timestamp without time zone" | "timestamp with time zone";
924
+ length?: number;
925
+ } & {
926
+ default: false;
927
+ }) | ({
928
+ type: import("./types/postgres").PostgresType;
929
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
930
+ nullable: boolean;
931
+ title?: string;
932
+ reference?: {
933
+ table: Table;
934
+ onUpdate?: import("./types/table").ReferenceActions;
935
+ onDelete?: import("./types/table").ReferenceActions;
936
+ column: string;
937
+ };
938
+ } & {
939
+ nullable: true;
940
+ } & {
941
+ type: "timestamp without time zone" | "timestamp with time zone";
942
+ length?: number;
943
+ } & {
944
+ default: true;
945
+ value: string;
946
+ }) | ({
947
+ type: import("./types/postgres").PostgresType;
948
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
949
+ nullable: boolean;
950
+ title?: string;
951
+ reference?: {
952
+ table: Table;
953
+ onUpdate?: import("./types/table").ReferenceActions;
954
+ onDelete?: import("./types/table").ReferenceActions;
955
+ column: string;
956
+ };
957
+ } & {
958
+ nullable: true;
959
+ } & {
960
+ type: "timestamp without time zone" | "timestamp with time zone";
961
+ length?: number;
962
+ } & {
963
+ default: "created-at" | "updated-at";
964
+ type: "timestamp without time zone" | "timestamp with time zone";
965
+ }) | ({
966
+ type: import("./types/postgres").PostgresType;
967
+ default: boolean | "value" | "auto-increment" | "created-at" | "updated-at";
968
+ nullable: boolean;
969
+ title?: string;
970
+ reference?: {
971
+ table: Table;
972
+ onUpdate?: import("./types/table").ReferenceActions;
973
+ onDelete?: import("./types/table").ReferenceActions;
974
+ column: string;
975
+ };
976
+ } & {
977
+ nullable: true;
978
+ } & {
979
+ type: "timestamp without time zone" | "timestamp with time zone";
980
+ length?: number;
981
+ } & {
982
+ default: "value";
983
+ type: "date" | "timestamp without time zone" | "timestamp with time zone";
984
+ value: Date;
985
+ });
986
+ } ? { [columnKey in keyof T_1]?: [op: null extends import("./types/postgres").PostgresTypeMapper<T["columns"][columnKey]["type"], T["columns"][columnKey]["nullable"]> ? import("./types/context").NullOperator : never] | [op: import("./types/postgres").PostgresTypeMapper<T["columns"][columnKey]["type"], T["columns"][columnKey]["nullable"]> extends boolean ? import("./types/context").BooleanOperator : never] | [op: import("./types/context").CompareOperatorCompatible<import("./types/postgres").PostgresTypeMapper<T["columns"][columnKey]["type"], T["columns"][columnKey]["nullable"]>, import("./types/context").CompareOperator, never>, v: import("./types/entity").Expression<import("./types/postgres").PostgresTypeMapper<T["columns"][columnKey]["type"], T["columns"][columnKey]["nullable"]>>] | [op: import("./types/context").ListOperatorCompatible<import("./types/postgres").PostgresTypeMapper<T["columns"][columnKey]["type"], T["columns"][columnKey]["nullable"]>, import("./types/context").ListOperator, never>, v: import("./types/entity").Expression<import("./types/postgres").PostgresTypeMapper<T["columns"][columnKey]["type"], T["columns"][columnKey]["nullable"]>>[] | undefined] | [op: "like", v: import("./types/postgres").PostgresTypeMapper<T["columns"][columnKey]["type"], T["columns"][columnKey]["nullable"]> extends string ? import("./types/entity").Expression<string & import("./types/postgres").PostgresTypeMapper<T["columns"][columnKey]["type"], T["columns"][columnKey]["nullable"]>> : never] | [op: "like all" | "like some", v: import("./types/postgres").PostgresTypeMapper<T["columns"][columnKey]["type"], T["columns"][columnKey]["nullable"]> extends string ? import("./types/entity").Expression<string & import("./types/postgres").PostgresTypeMapper<T["columns"][columnKey]["type"], T["columns"][columnKey]["nullable"]>>[] | undefined : never] | [op: "@>" | "<@", v: import("./types/postgres").PostgresTypeMapper<T["columns"][columnKey]["type"], T["columns"][columnKey]["nullable"]> extends import("./types/json").JSON ? import("./types/entity").Expression<import("./types/json").JSON & import("./types/postgres").PostgresTypeMapper<T["columns"][columnKey]["type"], T["columns"][columnKey]["nullable"]>> : never] | [op: "?", v: import("./types/postgres").PostgresTypeMapper<T["columns"][columnKey]["type"], T["columns"][columnKey]["nullable"]> extends import("./types/json").JSON ? import("./types/entity").Expression<string> : never] | [op: "?|" | "?&", v: import("./types/postgres").PostgresTypeMapper<T["columns"][columnKey]["type"], T["columns"][columnKey]["nullable"]> extends import("./types/json").JSON ? import("./types/entity").Expression<string>[] | undefined : never]; } : never, alias: string) => import("./types/entity").ValueExpression<boolean>[];
987
+ export { createContext, createContextScopeHelper };
6
988
  //# sourceMappingURL=context.d.ts.map