@mrnafisia/type-query 1.0.53 → 1.1.1

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