@mrnafisia/type-query 1.0.48 → 1.0.50
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.
- package/README.md +2 -2
- package/dist/U.d.ts +2 -2
- package/dist/U.d.ts.map +1 -1
- package/dist/U.js +28 -27
- package/dist/U.js.map +1 -1
- package/dist/context.d.ts +987 -987
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +84 -85
- package/dist/context.js.map +1 -1
- package/dist/dictionary.d.ts +12 -12
- package/dist/dictionary.d.ts.map +1 -1
- package/dist/dictionary.js +179 -179
- package/dist/dictionary.js.map +1 -1
- package/dist/entity.d.ts +3585 -3585
- package/dist/entity.d.ts.map +1 -1
- package/dist/entity.js +1053 -1007
- package/dist/entity.js.map +1 -1
- package/dist/error.d.ts +4 -4
- package/dist/error.d.ts.map +1 -1
- package/dist/error.js +7 -6
- package/dist/error.js.map +1 -1
- package/dist/index.d.ts +18 -36
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +56 -60
- package/dist/index.js.map +1 -1
- package/dist/model.d.ts +1005 -1005
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +282 -282
- package/dist/model.js.map +1 -1
- package/dist/parser.d.ts +11 -11
- package/dist/parser.d.ts.map +1 -1
- package/dist/parser.js +120 -120
- package/dist/parser.js.map +1 -1
- package/dist/pool.d.ts +5 -5
- package/dist/pool.d.ts.map +1 -1
- package/dist/pool.js +122 -121
- package/dist/pool.js.map +1 -1
- package/dist/schema.d.ts +25 -25
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +405 -395
- package/dist/schema.js.map +1 -1
- package/dist/testUtil.d.ts +4 -4
- package/dist/testUtil.d.ts.map +1 -1
- package/dist/testUtil.js +343 -333
- package/dist/testUtil.js.map +1 -1
- package/dist/types/context.d.ts +51 -55
- package/dist/types/context.d.ts.map +1 -1
- package/dist/types/context.js +2 -2
- package/dist/types/entity.d.ts +70 -70
- package/dist/types/entity.d.ts.map +1 -1
- package/dist/types/entity.js +2 -2
- package/dist/types/json.d.ts +8 -8
- package/dist/types/json.d.ts.map +1 -1
- package/dist/types/json.js +2 -2
- package/dist/types/model.d.ts +23 -23
- package/dist/types/model.d.ts.map +1 -1
- package/dist/types/model.js +2 -2
- package/dist/types/pool.d.ts +18 -18
- package/dist/types/pool.d.ts.map +1 -1
- package/dist/types/pool.js +2 -2
- package/dist/types/postgres.d.ts +9 -9
- package/dist/types/postgres.d.ts.map +1 -1
- package/dist/types/postgres.js +2 -2
- package/dist/types/table.d.ts +233 -234
- package/dist/types/table.d.ts.map +1 -1
- package/dist/types/table.js +2 -2
- package/dist/types/testUtil.d.ts +26 -26
- package/dist/types/testUtil.d.ts.map +1 -1
- package/dist/types/testUtil.js +2 -2
- package/dist/utils.d.ts +67 -67
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +220 -220
- package/dist/utils.js.map +1 -1
- package/package.json +40 -39
package/dist/types/table.d.ts
CHANGED
|
@@ -1,235 +1,234 @@
|
|
|
1
|
-
import Decimal from 'decimal.js';
|
|
2
|
-
import type { JSON } from './json';
|
|
3
|
-
import { PostgresType } from './postgres';
|
|
4
|
-
type ReferenceActions = 'no-action' | 'restrict' | 'set-null' | 'set-Default' | 'cascade';
|
|
5
|
-
type Base = {
|
|
6
|
-
type: PostgresType;
|
|
7
|
-
default: boolean | 'value' | 'auto-increment' | 'created-at' | 'updated-at';
|
|
8
|
-
nullable: boolean;
|
|
9
|
-
title?: string;
|
|
10
|
-
reference?: {
|
|
11
|
-
table: Table;
|
|
12
|
-
onUpdate?: ReferenceActions;
|
|
13
|
-
onDelete?: ReferenceActions;
|
|
14
|
-
column: string;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
type Primary = {
|
|
18
|
-
primary?: true;
|
|
19
|
-
nullable: false;
|
|
20
|
-
} | {
|
|
21
|
-
nullable: true;
|
|
22
|
-
};
|
|
23
|
-
type Types = {
|
|
24
|
-
type: 'boolean' | 'text' | 'uuid' | 'date' | 'json' | 'jsonb';
|
|
25
|
-
} | {
|
|
26
|
-
type: 'smallint' | 'integer' | 'real' | 'double precision';
|
|
27
|
-
min?: number;
|
|
28
|
-
max?: number;
|
|
29
|
-
} | {
|
|
30
|
-
type: 'bigint';
|
|
31
|
-
min?: bigint;
|
|
32
|
-
max?: bigint;
|
|
33
|
-
} | {
|
|
34
|
-
type: 'numeric';
|
|
35
|
-
precision: number;
|
|
36
|
-
scale: number;
|
|
37
|
-
min?: Decimal;
|
|
38
|
-
max?: Decimal;
|
|
39
|
-
} | {
|
|
40
|
-
type: 'character' | 'character varying';
|
|
41
|
-
minLength?: number;
|
|
42
|
-
maxLength?: number;
|
|
43
|
-
regex?: RegExp;
|
|
44
|
-
} | {
|
|
45
|
-
type: 'timestamp without time zone' | 'timestamp with time zone';
|
|
46
|
-
length?: number;
|
|
47
|
-
};
|
|
48
|
-
type ReferenceCheck<T extends Table, C extends keyof T['columns']> = {
|
|
49
|
-
type: 'boolean';
|
|
50
|
-
reference?: {
|
|
51
|
-
table: T;
|
|
52
|
-
onUpdate?: ReferenceActions;
|
|
53
|
-
onDelete?: ReferenceActions;
|
|
54
|
-
column: T['columns'][C]['type'] extends 'boolean' ? C : never;
|
|
55
|
-
};
|
|
56
|
-
} | {
|
|
57
|
-
type: 'smallint';
|
|
58
|
-
reference?: {
|
|
59
|
-
table: T;
|
|
60
|
-
onUpdate?: ReferenceActions;
|
|
61
|
-
onDelete?: ReferenceActions;
|
|
62
|
-
column: T['columns'][C]['type'] extends 'smallint' ? C : never;
|
|
63
|
-
};
|
|
64
|
-
} | {
|
|
65
|
-
type: 'integer';
|
|
66
|
-
reference?: {
|
|
67
|
-
table: T;
|
|
68
|
-
onUpdate?: ReferenceActions;
|
|
69
|
-
onDelete?: ReferenceActions;
|
|
70
|
-
column: T['columns'][C]['type'] extends 'smallint' | 'integer' ? C : never;
|
|
71
|
-
};
|
|
72
|
-
} | {
|
|
73
|
-
type: 'bigint';
|
|
74
|
-
reference?: {
|
|
75
|
-
table: T;
|
|
76
|
-
onUpdate?: ReferenceActions;
|
|
77
|
-
onDelete?: ReferenceActions;
|
|
78
|
-
column: T['columns'][C]['type'] extends 'smallint' | 'integer' | 'bigint' ? C : never;
|
|
79
|
-
};
|
|
80
|
-
} | {
|
|
81
|
-
type: 'real';
|
|
82
|
-
reference?: {
|
|
83
|
-
table: T;
|
|
84
|
-
onUpdate?: ReferenceActions;
|
|
85
|
-
onDelete?: ReferenceActions;
|
|
86
|
-
column: T['columns'][C]['type'] extends 'real' ? C : never;
|
|
87
|
-
};
|
|
88
|
-
} | {
|
|
89
|
-
type: 'double precision';
|
|
90
|
-
reference?: {
|
|
91
|
-
table: T;
|
|
92
|
-
onUpdate?: ReferenceActions;
|
|
93
|
-
onDelete?: ReferenceActions;
|
|
94
|
-
column: T['columns'][C]['type'] extends 'double precision' ? C : never;
|
|
95
|
-
};
|
|
96
|
-
} | {
|
|
97
|
-
type: 'text';
|
|
98
|
-
reference?: {
|
|
99
|
-
table: T;
|
|
100
|
-
onUpdate?: ReferenceActions;
|
|
101
|
-
onDelete?: ReferenceActions;
|
|
102
|
-
column: T['columns'][C]['type'] extends 'text' ? C : never;
|
|
103
|
-
};
|
|
104
|
-
} | {
|
|
105
|
-
type: 'uuid';
|
|
106
|
-
reference?: {
|
|
107
|
-
table: T;
|
|
108
|
-
onUpdate?: ReferenceActions;
|
|
109
|
-
onDelete?: ReferenceActions;
|
|
110
|
-
column: T['columns'][C]['type'] extends 'uuid' ? C : never;
|
|
111
|
-
};
|
|
112
|
-
} | {
|
|
113
|
-
type: 'date';
|
|
114
|
-
reference?: {
|
|
115
|
-
table: T;
|
|
116
|
-
onUpdate?: ReferenceActions;
|
|
117
|
-
onDelete?: ReferenceActions;
|
|
118
|
-
column: T['columns'][C]['type'] extends 'date' ? C : never;
|
|
119
|
-
};
|
|
120
|
-
} | {
|
|
121
|
-
type: 'json';
|
|
122
|
-
reference?: {
|
|
123
|
-
table: T;
|
|
124
|
-
onUpdate?: ReferenceActions;
|
|
125
|
-
onDelete?: ReferenceActions;
|
|
126
|
-
column: T['columns'][C]['type'] extends 'json' ? C : never;
|
|
127
|
-
};
|
|
128
|
-
} | {
|
|
129
|
-
type: 'jsonb';
|
|
130
|
-
reference?: {
|
|
131
|
-
table: T;
|
|
132
|
-
onUpdate?: ReferenceActions;
|
|
133
|
-
onDelete?: ReferenceActions;
|
|
134
|
-
column: T['columns'][C]['type'] extends 'jsonb' ? C : never;
|
|
135
|
-
};
|
|
136
|
-
} | {
|
|
137
|
-
type: 'numeric';
|
|
138
|
-
reference?: {
|
|
139
|
-
table: T;
|
|
140
|
-
onUpdate?: ReferenceActions;
|
|
141
|
-
onDelete?: ReferenceActions;
|
|
142
|
-
column: T['columns'][C]['type'] extends 'numeric' ? C : never;
|
|
143
|
-
};
|
|
144
|
-
} | {
|
|
145
|
-
type: 'character';
|
|
146
|
-
reference?: {
|
|
147
|
-
table: T;
|
|
148
|
-
onUpdate?: ReferenceActions;
|
|
149
|
-
onDelete?: ReferenceActions;
|
|
150
|
-
column: T['columns'][C]['type'] extends 'character' ? C : never;
|
|
151
|
-
};
|
|
152
|
-
} | {
|
|
153
|
-
type: 'character varying';
|
|
154
|
-
reference?: {
|
|
155
|
-
table: T;
|
|
156
|
-
onUpdate?: ReferenceActions;
|
|
157
|
-
onDelete?: ReferenceActions;
|
|
158
|
-
column: T['columns'][C]['type'] extends 'character varying' ? C : never;
|
|
159
|
-
};
|
|
160
|
-
} | {
|
|
161
|
-
type: 'timestamp without time zone';
|
|
162
|
-
reference?: {
|
|
163
|
-
table: T;
|
|
164
|
-
onUpdate?: ReferenceActions;
|
|
165
|
-
onDelete?: ReferenceActions;
|
|
166
|
-
column: T['columns'][C]['type'] extends 'timestamp without time zone' ? C : never;
|
|
167
|
-
};
|
|
168
|
-
} | {
|
|
169
|
-
type: 'timestamp with time zone';
|
|
170
|
-
reference?: {
|
|
171
|
-
table: T;
|
|
172
|
-
onUpdate?: ReferenceActions;
|
|
173
|
-
onDelete?: ReferenceActions;
|
|
174
|
-
column: T['columns'][C]['type'] extends 'timestamp with time zone' ? C : never;
|
|
175
|
-
};
|
|
176
|
-
};
|
|
177
|
-
type Default = {
|
|
178
|
-
default: false;
|
|
179
|
-
} | {
|
|
180
|
-
default: true;
|
|
181
|
-
value: string;
|
|
182
|
-
} | {
|
|
183
|
-
default: 'auto-increment';
|
|
184
|
-
type: 'smallint' | 'integer' | 'bigint';
|
|
185
|
-
seqTitle?: string;
|
|
186
|
-
} | {
|
|
187
|
-
default: 'created-at' | 'updated-at';
|
|
188
|
-
type: 'timestamp without time zone' | 'timestamp with time zone';
|
|
189
|
-
} | ({
|
|
190
|
-
default: 'value';
|
|
191
|
-
type: 'boolean';
|
|
192
|
-
value: boolean;
|
|
193
|
-
} | {
|
|
194
|
-
default: 'value';
|
|
195
|
-
type: 'smallint' | 'integer' | 'real' | 'double precision';
|
|
196
|
-
value: number;
|
|
197
|
-
} | {
|
|
198
|
-
default: 'value';
|
|
199
|
-
type: 'bigint';
|
|
200
|
-
value: bigint;
|
|
201
|
-
} | {
|
|
202
|
-
default: 'value';
|
|
203
|
-
type: 'numeric';
|
|
204
|
-
value: Decimal;
|
|
205
|
-
} | {
|
|
206
|
-
default: 'value';
|
|
207
|
-
type: 'character' | 'character varying' | 'text' | 'uuid';
|
|
208
|
-
value: string;
|
|
209
|
-
} | {
|
|
210
|
-
default: 'value';
|
|
211
|
-
type: 'date' | 'timestamp without time zone' | 'timestamp with time zone';
|
|
212
|
-
value: Date;
|
|
213
|
-
} | {
|
|
214
|
-
default: 'value';
|
|
215
|
-
type: 'json' | 'jsonb';
|
|
216
|
-
value: JSON;
|
|
217
|
-
});
|
|
218
|
-
type Column = Base & Primary & Types & Default;
|
|
219
|
-
type Table = {
|
|
220
|
-
schema: string;
|
|
221
|
-
title: string;
|
|
222
|
-
columns: {
|
|
223
|
-
[key: string]: Column;
|
|
224
|
-
};
|
|
225
|
-
};
|
|
226
|
-
type TableCheck = {
|
|
227
|
-
schema: string;
|
|
228
|
-
title: string;
|
|
229
|
-
columns: {
|
|
230
|
-
[key: string]: Base & Primary & Types & Default & ReferenceCheck<Table, keyof Table['columns']>;
|
|
231
|
-
};
|
|
232
|
-
};
|
|
233
|
-
export
|
|
234
|
-
export type { ReferenceActions, Column, TableCheck };
|
|
1
|
+
import Decimal from 'decimal.js';
|
|
2
|
+
import type { JSON } from './json';
|
|
3
|
+
import { PostgresType } from './postgres';
|
|
4
|
+
type ReferenceActions = 'no-action' | 'restrict' | 'set-null' | 'set-Default' | 'cascade';
|
|
5
|
+
type Base = {
|
|
6
|
+
type: PostgresType;
|
|
7
|
+
default: boolean | 'value' | 'auto-increment' | 'created-at' | 'updated-at';
|
|
8
|
+
nullable: boolean;
|
|
9
|
+
title?: string;
|
|
10
|
+
reference?: {
|
|
11
|
+
table: Table;
|
|
12
|
+
onUpdate?: ReferenceActions;
|
|
13
|
+
onDelete?: ReferenceActions;
|
|
14
|
+
column: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
type Primary = {
|
|
18
|
+
primary?: true;
|
|
19
|
+
nullable: false;
|
|
20
|
+
} | {
|
|
21
|
+
nullable: true;
|
|
22
|
+
};
|
|
23
|
+
type Types = {
|
|
24
|
+
type: 'boolean' | 'text' | 'uuid' | 'date' | 'json' | 'jsonb';
|
|
25
|
+
} | {
|
|
26
|
+
type: 'smallint' | 'integer' | 'real' | 'double precision';
|
|
27
|
+
min?: number;
|
|
28
|
+
max?: number;
|
|
29
|
+
} | {
|
|
30
|
+
type: 'bigint';
|
|
31
|
+
min?: bigint;
|
|
32
|
+
max?: bigint;
|
|
33
|
+
} | {
|
|
34
|
+
type: 'numeric';
|
|
35
|
+
precision: number;
|
|
36
|
+
scale: number;
|
|
37
|
+
min?: Decimal;
|
|
38
|
+
max?: Decimal;
|
|
39
|
+
} | {
|
|
40
|
+
type: 'character' | 'character varying';
|
|
41
|
+
minLength?: number;
|
|
42
|
+
maxLength?: number;
|
|
43
|
+
regex?: RegExp;
|
|
44
|
+
} | {
|
|
45
|
+
type: 'timestamp without time zone' | 'timestamp with time zone';
|
|
46
|
+
length?: number;
|
|
47
|
+
};
|
|
48
|
+
type ReferenceCheck<T extends Table, C extends keyof T['columns']> = {
|
|
49
|
+
type: 'boolean';
|
|
50
|
+
reference?: {
|
|
51
|
+
table: T;
|
|
52
|
+
onUpdate?: ReferenceActions;
|
|
53
|
+
onDelete?: ReferenceActions;
|
|
54
|
+
column: T['columns'][C]['type'] extends 'boolean' ? C : never;
|
|
55
|
+
};
|
|
56
|
+
} | {
|
|
57
|
+
type: 'smallint';
|
|
58
|
+
reference?: {
|
|
59
|
+
table: T;
|
|
60
|
+
onUpdate?: ReferenceActions;
|
|
61
|
+
onDelete?: ReferenceActions;
|
|
62
|
+
column: T['columns'][C]['type'] extends 'smallint' ? C : never;
|
|
63
|
+
};
|
|
64
|
+
} | {
|
|
65
|
+
type: 'integer';
|
|
66
|
+
reference?: {
|
|
67
|
+
table: T;
|
|
68
|
+
onUpdate?: ReferenceActions;
|
|
69
|
+
onDelete?: ReferenceActions;
|
|
70
|
+
column: T['columns'][C]['type'] extends 'smallint' | 'integer' ? C : never;
|
|
71
|
+
};
|
|
72
|
+
} | {
|
|
73
|
+
type: 'bigint';
|
|
74
|
+
reference?: {
|
|
75
|
+
table: T;
|
|
76
|
+
onUpdate?: ReferenceActions;
|
|
77
|
+
onDelete?: ReferenceActions;
|
|
78
|
+
column: T['columns'][C]['type'] extends 'smallint' | 'integer' | 'bigint' ? C : never;
|
|
79
|
+
};
|
|
80
|
+
} | {
|
|
81
|
+
type: 'real';
|
|
82
|
+
reference?: {
|
|
83
|
+
table: T;
|
|
84
|
+
onUpdate?: ReferenceActions;
|
|
85
|
+
onDelete?: ReferenceActions;
|
|
86
|
+
column: T['columns'][C]['type'] extends 'real' ? C : never;
|
|
87
|
+
};
|
|
88
|
+
} | {
|
|
89
|
+
type: 'double precision';
|
|
90
|
+
reference?: {
|
|
91
|
+
table: T;
|
|
92
|
+
onUpdate?: ReferenceActions;
|
|
93
|
+
onDelete?: ReferenceActions;
|
|
94
|
+
column: T['columns'][C]['type'] extends 'double precision' ? C : never;
|
|
95
|
+
};
|
|
96
|
+
} | {
|
|
97
|
+
type: 'text';
|
|
98
|
+
reference?: {
|
|
99
|
+
table: T;
|
|
100
|
+
onUpdate?: ReferenceActions;
|
|
101
|
+
onDelete?: ReferenceActions;
|
|
102
|
+
column: T['columns'][C]['type'] extends 'text' ? C : never;
|
|
103
|
+
};
|
|
104
|
+
} | {
|
|
105
|
+
type: 'uuid';
|
|
106
|
+
reference?: {
|
|
107
|
+
table: T;
|
|
108
|
+
onUpdate?: ReferenceActions;
|
|
109
|
+
onDelete?: ReferenceActions;
|
|
110
|
+
column: T['columns'][C]['type'] extends 'uuid' ? C : never;
|
|
111
|
+
};
|
|
112
|
+
} | {
|
|
113
|
+
type: 'date';
|
|
114
|
+
reference?: {
|
|
115
|
+
table: T;
|
|
116
|
+
onUpdate?: ReferenceActions;
|
|
117
|
+
onDelete?: ReferenceActions;
|
|
118
|
+
column: T['columns'][C]['type'] extends 'date' ? C : never;
|
|
119
|
+
};
|
|
120
|
+
} | {
|
|
121
|
+
type: 'json';
|
|
122
|
+
reference?: {
|
|
123
|
+
table: T;
|
|
124
|
+
onUpdate?: ReferenceActions;
|
|
125
|
+
onDelete?: ReferenceActions;
|
|
126
|
+
column: T['columns'][C]['type'] extends 'json' ? C : never;
|
|
127
|
+
};
|
|
128
|
+
} | {
|
|
129
|
+
type: 'jsonb';
|
|
130
|
+
reference?: {
|
|
131
|
+
table: T;
|
|
132
|
+
onUpdate?: ReferenceActions;
|
|
133
|
+
onDelete?: ReferenceActions;
|
|
134
|
+
column: T['columns'][C]['type'] extends 'jsonb' ? C : never;
|
|
135
|
+
};
|
|
136
|
+
} | {
|
|
137
|
+
type: 'numeric';
|
|
138
|
+
reference?: {
|
|
139
|
+
table: T;
|
|
140
|
+
onUpdate?: ReferenceActions;
|
|
141
|
+
onDelete?: ReferenceActions;
|
|
142
|
+
column: T['columns'][C]['type'] extends 'numeric' ? C : never;
|
|
143
|
+
};
|
|
144
|
+
} | {
|
|
145
|
+
type: 'character';
|
|
146
|
+
reference?: {
|
|
147
|
+
table: T;
|
|
148
|
+
onUpdate?: ReferenceActions;
|
|
149
|
+
onDelete?: ReferenceActions;
|
|
150
|
+
column: T['columns'][C]['type'] extends 'character' ? C : never;
|
|
151
|
+
};
|
|
152
|
+
} | {
|
|
153
|
+
type: 'character varying';
|
|
154
|
+
reference?: {
|
|
155
|
+
table: T;
|
|
156
|
+
onUpdate?: ReferenceActions;
|
|
157
|
+
onDelete?: ReferenceActions;
|
|
158
|
+
column: T['columns'][C]['type'] extends 'character varying' ? C : never;
|
|
159
|
+
};
|
|
160
|
+
} | {
|
|
161
|
+
type: 'timestamp without time zone';
|
|
162
|
+
reference?: {
|
|
163
|
+
table: T;
|
|
164
|
+
onUpdate?: ReferenceActions;
|
|
165
|
+
onDelete?: ReferenceActions;
|
|
166
|
+
column: T['columns'][C]['type'] extends 'timestamp without time zone' ? C : never;
|
|
167
|
+
};
|
|
168
|
+
} | {
|
|
169
|
+
type: 'timestamp with time zone';
|
|
170
|
+
reference?: {
|
|
171
|
+
table: T;
|
|
172
|
+
onUpdate?: ReferenceActions;
|
|
173
|
+
onDelete?: ReferenceActions;
|
|
174
|
+
column: T['columns'][C]['type'] extends 'timestamp with time zone' ? C : never;
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
type Default = {
|
|
178
|
+
default: false;
|
|
179
|
+
} | {
|
|
180
|
+
default: true;
|
|
181
|
+
value: string;
|
|
182
|
+
} | {
|
|
183
|
+
default: 'auto-increment';
|
|
184
|
+
type: 'smallint' | 'integer' | 'bigint';
|
|
185
|
+
seqTitle?: string;
|
|
186
|
+
} | {
|
|
187
|
+
default: 'created-at' | 'updated-at';
|
|
188
|
+
type: 'timestamp without time zone' | 'timestamp with time zone';
|
|
189
|
+
} | ({
|
|
190
|
+
default: 'value';
|
|
191
|
+
type: 'boolean';
|
|
192
|
+
value: boolean;
|
|
193
|
+
} | {
|
|
194
|
+
default: 'value';
|
|
195
|
+
type: 'smallint' | 'integer' | 'real' | 'double precision';
|
|
196
|
+
value: number;
|
|
197
|
+
} | {
|
|
198
|
+
default: 'value';
|
|
199
|
+
type: 'bigint';
|
|
200
|
+
value: bigint;
|
|
201
|
+
} | {
|
|
202
|
+
default: 'value';
|
|
203
|
+
type: 'numeric';
|
|
204
|
+
value: Decimal;
|
|
205
|
+
} | {
|
|
206
|
+
default: 'value';
|
|
207
|
+
type: 'character' | 'character varying' | 'text' | 'uuid';
|
|
208
|
+
value: string;
|
|
209
|
+
} | {
|
|
210
|
+
default: 'value';
|
|
211
|
+
type: 'date' | 'timestamp without time zone' | 'timestamp with time zone';
|
|
212
|
+
value: Date;
|
|
213
|
+
} | {
|
|
214
|
+
default: 'value';
|
|
215
|
+
type: 'json' | 'jsonb';
|
|
216
|
+
value: JSON;
|
|
217
|
+
});
|
|
218
|
+
type Column = Base & Primary & Types & Default;
|
|
219
|
+
type Table = {
|
|
220
|
+
schema: string;
|
|
221
|
+
title: string;
|
|
222
|
+
columns: {
|
|
223
|
+
[key: string]: Column;
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
type TableCheck = {
|
|
227
|
+
schema: string;
|
|
228
|
+
title: string;
|
|
229
|
+
columns: {
|
|
230
|
+
[key: string]: Base & Primary & Types & Default & ReferenceCheck<Table, keyof Table['columns']>;
|
|
231
|
+
};
|
|
232
|
+
};
|
|
233
|
+
export type { Table, ReferenceActions, Column, TableCheck };
|
|
235
234
|
//# sourceMappingURL=table.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../src/types/table.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,YAAY,CAAC;AACjC,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../src/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AAE,OAAO,CAAC;IAAC,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,GACrD;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,WAAW,GAAG,mBAAmB,GAAG,MAAM,GAAG,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC9F;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,GAAG,6BAA6B,GAAG,0BAA0B,CAAC;IAAC,KAAK,EAAE,IAAI,CAAA;CAAE,GAC5G;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAAC,KAAK,EAAE,IAAI,CAAA;CAAE,CAC9D,CAAC;AAER,KAAK,MAAM,GAAG,IAAI,GAAG,OAAO,GAAG,KAAK,GAAG,OAAO,CAAC;AAC/C,KAAK,KAAK,GAAG;IACT,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CACtC,CAAC;AACF,KAAK,UAAU,GAAG;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,GAAG,KAAK,GAAG,OAAO,GAAG,cAAc,CAAC,KAAK,EAAE,MAAM,KAAK,CAAC,SAAS,CAAC,CAAC,CAAA;KAAE,CAAC;CAChH,CAAC;AAEF,YAAY,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC"}
|
package/dist/types/table.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=table.js.map
|
package/dist/types/testUtil.d.ts
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import Table from './table';
|
|
2
|
-
import { PoolClient } from 'pg';
|
|
3
|
-
import { Result } from 'never-catch';
|
|
4
|
-
import { SimpleModel } from './model';
|
|
5
|
-
import { ColumnTypeByColumns } from './postgres';
|
|
6
|
-
import { NullableAndDefaultColumns } from './entity';
|
|
7
|
-
import { Pool, TransactionIsolationLevel } from './pool';
|
|
8
|
-
type TestTableData<T extends Table> = {
|
|
9
|
-
table: T;
|
|
10
|
-
startData: ({
|
|
11
|
-
[columnKey in Exclude<keyof T['columns'], keyof NullableAndDefaultColumns<T['columns']>>]: ColumnTypeByColumns<T['columns'], columnKey>;
|
|
12
|
-
} & {
|
|
13
|
-
[columnKey in keyof NullableAndDefaultColumns<T['columns']>]?: ColumnTypeByColumns<T['columns'], columnKey & string>;
|
|
14
|
-
})[];
|
|
15
|
-
finalData: ((rows: SimpleModel<T['columns']>[]) => Result<any, any> | Promise<Result<any, any>>) | {
|
|
16
|
-
row: {
|
|
17
|
-
[columnKey in keyof T['columns']]: ((cell: ColumnTypeByColumns<T['columns'], columnKey>, row: SimpleModel<T['columns']>, rows: SimpleModel<T['columns']>[]) => Result<any, any> | Promise<Result<any, any>>) | ColumnTypeByColumns<T['columns'], columnKey>;
|
|
18
|
-
};
|
|
19
|
-
useTime?: ['equal', number] | ['moreThanEqual', number] | ['lessThanEqual', number] | undefined;
|
|
20
|
-
}[];
|
|
21
|
-
skipIt?: ((row: SimpleModel<T['columns']>) => Result<any, any> | Promise<Result<any, any>>) | undefined;
|
|
22
|
-
lengthCheck?: ((rows: SimpleModel<T['columns']>[]) => Result<any, any> | Promise<Result<any, any>>) | number | undefined;
|
|
23
|
-
};
|
|
24
|
-
type TestTransaction = (data: TestTableData<any>[], callback: (client: PoolClient) => void, pool: Pool, isolationLevel?: TransactionIsolationLevel, rollback?: boolean) => Promise<undefined>;
|
|
25
|
-
type CreateTestTableData = <T extends Table>(table: T, startData: TestTableData<T>['startData'], finalData: TestTableData<T>['finalData'], skipIt?: TestTableData<T>['skipIt'], lengthCheck?: TestTableData<T>['lengthCheck']) => TestTableData<T>;
|
|
26
|
-
export type { TestTableData, TestTransaction, CreateTestTableData };
|
|
1
|
+
import { Table } from './table';
|
|
2
|
+
import { PoolClient } from 'pg';
|
|
3
|
+
import { Result } from 'never-catch';
|
|
4
|
+
import { SimpleModel } from './model';
|
|
5
|
+
import { ColumnTypeByColumns } from './postgres';
|
|
6
|
+
import { NullableAndDefaultColumns } from './entity';
|
|
7
|
+
import { Pool, TransactionIsolationLevel } from './pool';
|
|
8
|
+
type TestTableData<T extends Table> = {
|
|
9
|
+
table: T;
|
|
10
|
+
startData: ({
|
|
11
|
+
[columnKey in Exclude<keyof T['columns'], keyof NullableAndDefaultColumns<T['columns']>>]: ColumnTypeByColumns<T['columns'], columnKey>;
|
|
12
|
+
} & {
|
|
13
|
+
[columnKey in keyof NullableAndDefaultColumns<T['columns']>]?: ColumnTypeByColumns<T['columns'], columnKey & string>;
|
|
14
|
+
})[];
|
|
15
|
+
finalData: ((rows: SimpleModel<T['columns']>[]) => Result<any, any> | Promise<Result<any, any>>) | {
|
|
16
|
+
row: {
|
|
17
|
+
[columnKey in keyof T['columns']]: ((cell: ColumnTypeByColumns<T['columns'], columnKey>, row: SimpleModel<T['columns']>, rows: SimpleModel<T['columns']>[]) => Result<any, any> | Promise<Result<any, any>>) | ColumnTypeByColumns<T['columns'], columnKey>;
|
|
18
|
+
};
|
|
19
|
+
useTime?: ['equal', number] | ['moreThanEqual', number] | ['lessThanEqual', number] | undefined;
|
|
20
|
+
}[];
|
|
21
|
+
skipIt?: ((row: SimpleModel<T['columns']>) => Result<any, any> | Promise<Result<any, any>>) | undefined;
|
|
22
|
+
lengthCheck?: ((rows: SimpleModel<T['columns']>[]) => Result<any, any> | Promise<Result<any, any>>) | number | undefined;
|
|
23
|
+
};
|
|
24
|
+
type TestTransaction = (data: TestTableData<any>[], callback: (client: PoolClient) => void, pool: Pool, isolationLevel?: TransactionIsolationLevel, rollback?: boolean) => Promise<undefined>;
|
|
25
|
+
type CreateTestTableData = <T extends Table>(table: T, startData: TestTableData<T>['startData'], finalData: TestTableData<T>['finalData'], skipIt?: TestTableData<T>['skipIt'], lengthCheck?: TestTableData<T>['lengthCheck']) => TestTableData<T>;
|
|
26
|
+
export type { TestTableData, TestTransaction, CreateTestTableData };
|
|
27
27
|
//# sourceMappingURL=testUtil.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testUtil.d.ts","sourceRoot":"","sources":["../../src/types/testUtil.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"testUtil.d.ts","sourceRoot":"","sources":["../../src/types/testUtil.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,yBAAyB,EAAE,MAAM,QAAQ,CAAC;AAEzD,KAAK,aAAa,CAAC,CAAC,SAAS,KAAK,IAAI;IAClC,KAAK,EAAE,CAAC,CAAC;IACT,SAAS,EAAE,CAAC;SACP,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,EAAE,MAAM,yBAAyB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,mBAAmB,CAC1G,CAAC,CAAC,SAAS,CAAC,EACZ,SAAS,CACZ;KACJ,GAAG;SACC,SAAS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CAAC,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,GACrF,MAAM,GACN,SAAS,CAAC;CACnB,CAAC;AACF,KAAK,eAAe,GAAG,CACnB,IAAI,EAAE,aAAa,CAAC,GAAG,CAAC,EAAE,EAC1B,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,EACtC,IAAI,EAAE,IAAI,EACV,cAAc,CAAC,EAAE,yBAAyB,EAC1C,QAAQ,CAAC,EAAE,OAAO,KACjB,OAAO,CAAC,SAAS,CAAC,CAAC;AACxB,KAAK,mBAAmB,GAAG,CAAC,CAAC,SAAS,KAAK,EACvC,KAAK,EAAE,CAAC,EACR,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,EACxC,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,EACxC,MAAM,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EACnC,WAAW,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,KAC5C,aAAa,CAAC,CAAC,CAAC,CAAC;AAEtB,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,mBAAmB,EAAE,CAAC"}
|
package/dist/types/testUtil.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=testUtil.js.map
|