prostgles-server 2.0.229 → 2.0.232
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/dist/DBSchemaBuilder.d.ts.map +1 -1
- package/dist/DBSchemaBuilder.js +10 -1
- package/dist/DBSchemaBuilder.js.map +1 -1
- package/dist/TableConfig.d.ts +5 -1
- package/dist/TableConfig.d.ts.map +1 -1
- package/dist/TableConfig.js +28 -24
- package/dist/TableConfig.js.map +1 -1
- package/dist/validation.d.ts +50 -0
- package/dist/validation.d.ts.map +1 -0
- package/dist/validation.js +139 -0
- package/dist/validation.js.map +1 -0
- package/lib/DBSchemaBuilder.d.ts.map +1 -1
- package/lib/DBSchemaBuilder.js +10 -1
- package/lib/DBSchemaBuilder.ts +10 -1
- package/lib/TableConfig.d.ts +5 -1
- package/lib/TableConfig.d.ts.map +1 -1
- package/lib/TableConfig.js +28 -24
- package/lib/TableConfig.ts +37 -27
- package/lib/validation.d.ts +50 -0
- package/lib/validation.d.ts.map +1 -0
- package/lib/validation.js +138 -0
- package/lib/validation.ts +162 -0
- package/package.json +1 -1
- package/tests/client/PID.txt +1 -1
- package/tests/isomorphic_queries.d.ts.map +1 -1
- package/tests/isomorphic_queries.js +25 -0
- package/tests/isomorphic_queries.ts +28 -1
- package/tests/server/DBoGenerated.d.ts +140 -122
- package/tests/server/index.js +14 -0
- package/tests/server/index.ts +14 -0
- package/tests/server/package-lock.json +1 -1
|
@@ -623,7 +623,34 @@ export default async function isomorphic(db: Partial<DBHandlerServer> | Partial<
|
|
|
623
623
|
const newF = await db.media.findOne({ id: original.id });
|
|
624
624
|
|
|
625
625
|
assert.equal(newF.original_name, newFile.name)
|
|
626
|
-
})
|
|
626
|
+
});
|
|
627
|
+
|
|
628
|
+
await tryRun("jsonbSchema validation", async () => {
|
|
629
|
+
|
|
630
|
+
/**
|
|
631
|
+
*
|
|
632
|
+
tjson: {
|
|
633
|
+
json: { jsonbSchema: {
|
|
634
|
+
a: { type: "boolean" },
|
|
635
|
+
arr: { oneOf: ["1", "2", "3"] },
|
|
636
|
+
arr2: { type: "integer[]" },
|
|
637
|
+
o: { oneOfTypes: [{ o1: { type: "integer" } }, { o2: { type: "boolean" } }], optional: true },
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
},
|
|
641
|
+
*/
|
|
642
|
+
|
|
643
|
+
const json = {a: true, arr: "2"}
|
|
644
|
+
const fo = await db.tjson.insert({ json }, { returning: "*"});
|
|
645
|
+
assert.deepStrictEqual(fo.json, json);
|
|
646
|
+
await db.tjson.insert({ json: {o: { o1: 2, o2: true }, a: true, arr: 1 } })
|
|
647
|
+
try {
|
|
648
|
+
await db.tjson.insert({ json: { a: true, arr: "22"} });
|
|
649
|
+
throw "Should have failed"
|
|
650
|
+
} catch(e){
|
|
651
|
+
// Perfect
|
|
652
|
+
}
|
|
653
|
+
});
|
|
627
654
|
|
|
628
655
|
await tryRun("Exists filter example", async () => {
|
|
629
656
|
|
|
@@ -12,8 +12,8 @@ export type DBSchemaGenerated = {
|
|
|
12
12
|
update: true;
|
|
13
13
|
delete: true;
|
|
14
14
|
columns: {
|
|
15
|
-
"\"*\""?:
|
|
16
|
-
id?: number
|
|
15
|
+
"\"*\""?: null | string;
|
|
16
|
+
id?: number;
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
19
|
"*": {
|
|
@@ -23,8 +23,8 @@ export type DBSchemaGenerated = {
|
|
|
23
23
|
update: true;
|
|
24
24
|
delete: true;
|
|
25
25
|
columns: {
|
|
26
|
-
"*"?:
|
|
27
|
-
id?: number
|
|
26
|
+
"*"?: null | string;
|
|
27
|
+
id?: number;
|
|
28
28
|
};
|
|
29
29
|
};
|
|
30
30
|
ex_j_ins: {
|
|
@@ -34,10 +34,10 @@ export type DBSchemaGenerated = {
|
|
|
34
34
|
update: true;
|
|
35
35
|
delete: true;
|
|
36
36
|
columns: {
|
|
37
|
-
added?:
|
|
38
|
-
id?: number
|
|
39
|
-
name: string
|
|
40
|
-
public?:
|
|
37
|
+
added?: null | Date;
|
|
38
|
+
id?: number;
|
|
39
|
+
name: string;
|
|
40
|
+
public?: null | string;
|
|
41
41
|
};
|
|
42
42
|
};
|
|
43
43
|
geography_columns: {
|
|
@@ -47,13 +47,13 @@ export type DBSchemaGenerated = {
|
|
|
47
47
|
update: true;
|
|
48
48
|
delete: true;
|
|
49
49
|
columns: {
|
|
50
|
-
coord_dimension?:
|
|
51
|
-
f_geography_column?:
|
|
52
|
-
f_table_catalog?:
|
|
53
|
-
f_table_name?:
|
|
54
|
-
f_table_schema?:
|
|
55
|
-
srid?:
|
|
56
|
-
type?:
|
|
50
|
+
coord_dimension?: null | number;
|
|
51
|
+
f_geography_column?: null | string;
|
|
52
|
+
f_table_catalog?: null | string;
|
|
53
|
+
f_table_name?: null | string;
|
|
54
|
+
f_table_schema?: null | string;
|
|
55
|
+
srid?: null | number;
|
|
56
|
+
type?: null | string;
|
|
57
57
|
};
|
|
58
58
|
};
|
|
59
59
|
geometry_columns: {
|
|
@@ -63,13 +63,13 @@ export type DBSchemaGenerated = {
|
|
|
63
63
|
update: true;
|
|
64
64
|
delete: true;
|
|
65
65
|
columns: {
|
|
66
|
-
coord_dimension?:
|
|
67
|
-
f_geometry_column?:
|
|
68
|
-
f_table_catalog?:
|
|
69
|
-
f_table_name?:
|
|
70
|
-
f_table_schema?:
|
|
71
|
-
srid?:
|
|
72
|
-
type?:
|
|
66
|
+
coord_dimension?: null | number;
|
|
67
|
+
f_geometry_column?: null | string;
|
|
68
|
+
f_table_catalog?: null | string;
|
|
69
|
+
f_table_name?: null | string;
|
|
70
|
+
f_table_schema?: null | string;
|
|
71
|
+
srid?: null | number;
|
|
72
|
+
type?: null | string;
|
|
73
73
|
};
|
|
74
74
|
};
|
|
75
75
|
insert_rules: {
|
|
@@ -79,9 +79,9 @@ export type DBSchemaGenerated = {
|
|
|
79
79
|
update: true;
|
|
80
80
|
delete: true;
|
|
81
81
|
columns: {
|
|
82
|
-
added?:
|
|
83
|
-
id?: number
|
|
84
|
-
name?:
|
|
82
|
+
added?: null | Date;
|
|
83
|
+
id?: number;
|
|
84
|
+
name?: null | string;
|
|
85
85
|
};
|
|
86
86
|
};
|
|
87
87
|
item_children: {
|
|
@@ -91,10 +91,10 @@ export type DBSchemaGenerated = {
|
|
|
91
91
|
update: true;
|
|
92
92
|
delete: true;
|
|
93
93
|
columns: {
|
|
94
|
-
id?: number
|
|
95
|
-
item_id?:
|
|
96
|
-
name?:
|
|
97
|
-
tst?:
|
|
94
|
+
id?: number;
|
|
95
|
+
item_id?: null | number;
|
|
96
|
+
name?: null | string;
|
|
97
|
+
tst?: null | Date;
|
|
98
98
|
};
|
|
99
99
|
};
|
|
100
100
|
items: {
|
|
@@ -104,9 +104,9 @@ export type DBSchemaGenerated = {
|
|
|
104
104
|
update: true;
|
|
105
105
|
delete: true;
|
|
106
106
|
columns: {
|
|
107
|
-
h?: Array<string
|
|
108
|
-
id?: number
|
|
109
|
-
name?:
|
|
107
|
+
h?: null | Array<string>;
|
|
108
|
+
id?: number;
|
|
109
|
+
name?: null | string;
|
|
110
110
|
};
|
|
111
111
|
};
|
|
112
112
|
items_multi: {
|
|
@@ -116,12 +116,12 @@ export type DBSchemaGenerated = {
|
|
|
116
116
|
update: true;
|
|
117
117
|
delete: true;
|
|
118
118
|
columns: {
|
|
119
|
-
id?: number
|
|
120
|
-
items0_id?:
|
|
121
|
-
items1_id?:
|
|
122
|
-
items2_id?:
|
|
123
|
-
items3_id?:
|
|
124
|
-
name?:
|
|
119
|
+
id?: number;
|
|
120
|
+
items0_id?: null | number;
|
|
121
|
+
items1_id?: null | number;
|
|
122
|
+
items2_id?: null | number;
|
|
123
|
+
items3_id?: null | number;
|
|
124
|
+
name?: null | string;
|
|
125
125
|
};
|
|
126
126
|
};
|
|
127
127
|
items_with_media: {
|
|
@@ -131,8 +131,8 @@ export type DBSchemaGenerated = {
|
|
|
131
131
|
update: true;
|
|
132
132
|
delete: true;
|
|
133
133
|
columns: {
|
|
134
|
-
id?: number
|
|
135
|
-
name?:
|
|
134
|
+
id?: number;
|
|
135
|
+
name?: null | string;
|
|
136
136
|
};
|
|
137
137
|
};
|
|
138
138
|
items_with_one_media: {
|
|
@@ -142,8 +142,8 @@ export type DBSchemaGenerated = {
|
|
|
142
142
|
update: true;
|
|
143
143
|
delete: true;
|
|
144
144
|
columns: {
|
|
145
|
-
id?: number
|
|
146
|
-
name?:
|
|
145
|
+
id?: number;
|
|
146
|
+
name?: null | string;
|
|
147
147
|
};
|
|
148
148
|
};
|
|
149
149
|
items2: {
|
|
@@ -153,10 +153,10 @@ export type DBSchemaGenerated = {
|
|
|
153
153
|
update: true;
|
|
154
154
|
delete: true;
|
|
155
155
|
columns: {
|
|
156
|
-
hh?: Array<string
|
|
157
|
-
id?: number
|
|
158
|
-
items_id?:
|
|
159
|
-
name?:
|
|
156
|
+
hh?: null | Array<string>;
|
|
157
|
+
id?: number;
|
|
158
|
+
items_id?: null | number;
|
|
159
|
+
name?: null | string;
|
|
160
160
|
};
|
|
161
161
|
};
|
|
162
162
|
items3: {
|
|
@@ -166,9 +166,9 @@ export type DBSchemaGenerated = {
|
|
|
166
166
|
update: true;
|
|
167
167
|
delete: true;
|
|
168
168
|
columns: {
|
|
169
|
-
h?: Array<string
|
|
170
|
-
id?: number
|
|
171
|
-
name?:
|
|
169
|
+
h?: null | Array<string>;
|
|
170
|
+
id?: number;
|
|
171
|
+
name?: null | string;
|
|
172
172
|
};
|
|
173
173
|
};
|
|
174
174
|
items4: {
|
|
@@ -178,10 +178,10 @@ export type DBSchemaGenerated = {
|
|
|
178
178
|
update: true;
|
|
179
179
|
delete: true;
|
|
180
180
|
columns: {
|
|
181
|
-
added?:
|
|
182
|
-
id?: number
|
|
183
|
-
name: string
|
|
184
|
-
public?:
|
|
181
|
+
added?: null | Date;
|
|
182
|
+
id?: number;
|
|
183
|
+
name: string;
|
|
184
|
+
public?: null | string;
|
|
185
185
|
};
|
|
186
186
|
};
|
|
187
187
|
items4_pub: {
|
|
@@ -191,10 +191,10 @@ export type DBSchemaGenerated = {
|
|
|
191
191
|
update: true;
|
|
192
192
|
delete: true;
|
|
193
193
|
columns: {
|
|
194
|
-
added?:
|
|
195
|
-
id?: number
|
|
196
|
-
name: string
|
|
197
|
-
public?:
|
|
194
|
+
added?: null | Date;
|
|
195
|
+
id?: number;
|
|
196
|
+
name: string;
|
|
197
|
+
public?: null | string;
|
|
198
198
|
};
|
|
199
199
|
};
|
|
200
200
|
items4a: {
|
|
@@ -204,10 +204,10 @@ export type DBSchemaGenerated = {
|
|
|
204
204
|
update: true;
|
|
205
205
|
delete: true;
|
|
206
206
|
columns: {
|
|
207
|
-
id?: number
|
|
208
|
-
items_id?:
|
|
209
|
-
items2_id?:
|
|
210
|
-
name?:
|
|
207
|
+
id?: number;
|
|
208
|
+
items_id?: null | number;
|
|
209
|
+
items2_id?: null | number;
|
|
210
|
+
name?: null | string;
|
|
211
211
|
};
|
|
212
212
|
};
|
|
213
213
|
lookup_col1: {
|
|
@@ -217,7 +217,7 @@ export type DBSchemaGenerated = {
|
|
|
217
217
|
update: true;
|
|
218
218
|
delete: true;
|
|
219
219
|
columns: {
|
|
220
|
-
id: string
|
|
220
|
+
id: string;
|
|
221
221
|
};
|
|
222
222
|
};
|
|
223
223
|
lookup_status: {
|
|
@@ -227,9 +227,9 @@ export type DBSchemaGenerated = {
|
|
|
227
227
|
update: true;
|
|
228
228
|
delete: true;
|
|
229
229
|
columns: {
|
|
230
|
-
en?:
|
|
231
|
-
fr?:
|
|
232
|
-
id: string
|
|
230
|
+
en?: null | string;
|
|
231
|
+
fr?: null | string;
|
|
232
|
+
id: string;
|
|
233
233
|
};
|
|
234
234
|
};
|
|
235
235
|
media: {
|
|
@@ -239,20 +239,20 @@ export type DBSchemaGenerated = {
|
|
|
239
239
|
update: true;
|
|
240
240
|
delete: true;
|
|
241
241
|
columns: {
|
|
242
|
-
content_length?: number
|
|
243
|
-
content_type: string
|
|
244
|
-
deleted?:
|
|
245
|
-
deleted_from_storage?:
|
|
246
|
-
description?:
|
|
247
|
-
etag?:
|
|
248
|
-
extension: string
|
|
249
|
-
id?: string
|
|
250
|
-
name: string
|
|
251
|
-
original_name: string
|
|
252
|
-
s3_url?:
|
|
253
|
-
signed_url?:
|
|
254
|
-
signed_url_expires?:
|
|
255
|
-
url: string
|
|
242
|
+
content_length?: number;
|
|
243
|
+
content_type: string;
|
|
244
|
+
deleted?: null | number;
|
|
245
|
+
deleted_from_storage?: null | number;
|
|
246
|
+
description?: null | string;
|
|
247
|
+
etag?: null | string;
|
|
248
|
+
extension: string;
|
|
249
|
+
id?: string;
|
|
250
|
+
name: string;
|
|
251
|
+
original_name: string;
|
|
252
|
+
s3_url?: null | string;
|
|
253
|
+
signed_url?: null | string;
|
|
254
|
+
signed_url_expires?: null | number;
|
|
255
|
+
url: string;
|
|
256
256
|
};
|
|
257
257
|
};
|
|
258
258
|
obj_table: {
|
|
@@ -262,8 +262,8 @@ export type DBSchemaGenerated = {
|
|
|
262
262
|
update: true;
|
|
263
263
|
delete: true;
|
|
264
264
|
columns: {
|
|
265
|
-
id?: number
|
|
266
|
-
obj?:
|
|
265
|
+
id?: number;
|
|
266
|
+
obj?: null | any;
|
|
267
267
|
};
|
|
268
268
|
};
|
|
269
269
|
planes: {
|
|
@@ -273,11 +273,11 @@ export type DBSchemaGenerated = {
|
|
|
273
273
|
update: true;
|
|
274
274
|
delete: true;
|
|
275
275
|
columns: {
|
|
276
|
-
flight_number?:
|
|
277
|
-
id?: number
|
|
278
|
-
last_updated: number
|
|
279
|
-
x?:
|
|
280
|
-
y?:
|
|
276
|
+
flight_number?: null | string;
|
|
277
|
+
id?: number;
|
|
278
|
+
last_updated: number;
|
|
279
|
+
x?: null | number;
|
|
280
|
+
y?: null | number;
|
|
281
281
|
};
|
|
282
282
|
};
|
|
283
283
|
prostgles_lookup_media_items_with_media: {
|
|
@@ -287,8 +287,8 @@ export type DBSchemaGenerated = {
|
|
|
287
287
|
update: true;
|
|
288
288
|
delete: true;
|
|
289
289
|
columns: {
|
|
290
|
-
foreign_id?:
|
|
291
|
-
media_id: string
|
|
290
|
+
foreign_id?: null | number;
|
|
291
|
+
media_id: string;
|
|
292
292
|
};
|
|
293
293
|
};
|
|
294
294
|
prostgles_lookup_media_items_with_one_media: {
|
|
@@ -298,8 +298,8 @@ export type DBSchemaGenerated = {
|
|
|
298
298
|
update: true;
|
|
299
299
|
delete: true;
|
|
300
300
|
columns: {
|
|
301
|
-
foreign_id: number
|
|
302
|
-
media_id: string
|
|
301
|
+
foreign_id: number;
|
|
302
|
+
media_id: string;
|
|
303
303
|
};
|
|
304
304
|
};
|
|
305
305
|
shapes: {
|
|
@@ -309,9 +309,9 @@ export type DBSchemaGenerated = {
|
|
|
309
309
|
update: true;
|
|
310
310
|
delete: true;
|
|
311
311
|
columns: {
|
|
312
|
-
geog?:
|
|
313
|
-
geom?:
|
|
314
|
-
id?: string
|
|
312
|
+
geog?: null | any;
|
|
313
|
+
geom?: null | any;
|
|
314
|
+
id?: string;
|
|
315
315
|
};
|
|
316
316
|
};
|
|
317
317
|
spatial_ref_sys: {
|
|
@@ -321,11 +321,29 @@ export type DBSchemaGenerated = {
|
|
|
321
321
|
update: true;
|
|
322
322
|
delete: true;
|
|
323
323
|
columns: {
|
|
324
|
-
auth_name?:
|
|
325
|
-
auth_srid?:
|
|
326
|
-
proj4text?:
|
|
327
|
-
srid: number
|
|
328
|
-
srtext?:
|
|
324
|
+
auth_name?: null | string;
|
|
325
|
+
auth_srid?: null | number;
|
|
326
|
+
proj4text?: null | string;
|
|
327
|
+
srid: number;
|
|
328
|
+
srtext?: null | string;
|
|
329
|
+
};
|
|
330
|
+
};
|
|
331
|
+
tjson: {
|
|
332
|
+
is_view: false;
|
|
333
|
+
select: true;
|
|
334
|
+
insert: true;
|
|
335
|
+
update: true;
|
|
336
|
+
delete: true;
|
|
337
|
+
columns: {
|
|
338
|
+
json: {
|
|
339
|
+
a: boolean;
|
|
340
|
+
arr: '1' | '2' | '3';
|
|
341
|
+
arr1: 1 | 2 | 3;
|
|
342
|
+
arr2: number[];
|
|
343
|
+
o?:
|
|
344
|
+
| { o1: number; }
|
|
345
|
+
| { o2: boolean; };
|
|
346
|
+
};
|
|
329
347
|
};
|
|
330
348
|
};
|
|
331
349
|
tr1: {
|
|
@@ -335,8 +353,8 @@ export type DBSchemaGenerated = {
|
|
|
335
353
|
update: true;
|
|
336
354
|
delete: true;
|
|
337
355
|
columns: {
|
|
338
|
-
id?: number
|
|
339
|
-
t1?:
|
|
356
|
+
id?: number;
|
|
357
|
+
t1?: null | string;
|
|
340
358
|
};
|
|
341
359
|
};
|
|
342
360
|
tr2: {
|
|
@@ -346,10 +364,10 @@ export type DBSchemaGenerated = {
|
|
|
346
364
|
update: true;
|
|
347
365
|
delete: true;
|
|
348
366
|
columns: {
|
|
349
|
-
id?: number
|
|
350
|
-
t1?:
|
|
351
|
-
t2?:
|
|
352
|
-
tr1_id?:
|
|
367
|
+
id?: number;
|
|
368
|
+
t1?: null | string;
|
|
369
|
+
t2?: null | string;
|
|
370
|
+
tr1_id?: null | number;
|
|
353
371
|
};
|
|
354
372
|
};
|
|
355
373
|
usr: {
|
|
@@ -359,12 +377,12 @@ export type DBSchemaGenerated = {
|
|
|
359
377
|
update: true;
|
|
360
378
|
delete: true;
|
|
361
379
|
columns: {
|
|
362
|
-
added?:
|
|
363
|
-
age?:
|
|
364
|
-
id?: number
|
|
365
|
-
is_active?:
|
|
366
|
-
msg?:
|
|
367
|
-
status?:
|
|
380
|
+
added?: null | Date;
|
|
381
|
+
age?: null | number;
|
|
382
|
+
id?: number;
|
|
383
|
+
is_active?: null | boolean;
|
|
384
|
+
msg?: null | string;
|
|
385
|
+
status?: null | string;
|
|
368
386
|
};
|
|
369
387
|
};
|
|
370
388
|
uuid_text: {
|
|
@@ -374,10 +392,10 @@ export type DBSchemaGenerated = {
|
|
|
374
392
|
update: true;
|
|
375
393
|
delete: true;
|
|
376
394
|
columns: {
|
|
377
|
-
col1?:
|
|
378
|
-
col2?:
|
|
379
|
-
id?: string
|
|
380
|
-
name?:
|
|
395
|
+
col1?: null | string;
|
|
396
|
+
col2?: null | string;
|
|
397
|
+
id?: string;
|
|
398
|
+
name?: null | string;
|
|
381
399
|
};
|
|
382
400
|
};
|
|
383
401
|
v_items: {
|
|
@@ -387,8 +405,8 @@ export type DBSchemaGenerated = {
|
|
|
387
405
|
update: true;
|
|
388
406
|
delete: true;
|
|
389
407
|
columns: {
|
|
390
|
-
id?:
|
|
391
|
-
name?:
|
|
408
|
+
id?: null | number;
|
|
409
|
+
name?: null | string;
|
|
392
410
|
};
|
|
393
411
|
};
|
|
394
412
|
various: {
|
|
@@ -398,12 +416,12 @@ export type DBSchemaGenerated = {
|
|
|
398
416
|
update: true;
|
|
399
417
|
delete: true;
|
|
400
418
|
columns: {
|
|
401
|
-
added?:
|
|
402
|
-
h?: Array<string
|
|
403
|
-
id?: number
|
|
404
|
-
jsn?:
|
|
405
|
-
name?:
|
|
406
|
-
tsv?:
|
|
419
|
+
added?: null | Date;
|
|
420
|
+
h?: null | Array<string>;
|
|
421
|
+
id?: number;
|
|
422
|
+
jsn?: null | any;
|
|
423
|
+
name?: null | string;
|
|
424
|
+
tsv?: null | any;
|
|
407
425
|
};
|
|
408
426
|
};
|
|
409
427
|
|
package/tests/server/index.js
CHANGED
|
@@ -64,6 +64,19 @@ function dd() {
|
|
|
64
64
|
t2: { label: { en: "en_t2" } },
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
|
+
tjson: {
|
|
68
|
+
dropIfExists: true,
|
|
69
|
+
columns: {
|
|
70
|
+
json: { jsonbSchema: {
|
|
71
|
+
a: { type: "boolean" },
|
|
72
|
+
arr: { oneOf: ["1", "2", "3"] },
|
|
73
|
+
arr1: { oneOf: [1, 2, 3] },
|
|
74
|
+
arr2: { type: "integer[]" },
|
|
75
|
+
o: { oneOfTypes: [{ o1: { type: "integer" } }, { o2: { type: "boolean" } }], optional: true },
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
67
80
|
lookup_col1: {
|
|
68
81
|
dropIfExists: true,
|
|
69
82
|
isLookupTable: {
|
|
@@ -205,6 +218,7 @@ function dd() {
|
|
|
205
218
|
items2: "*",
|
|
206
219
|
items3: "*",
|
|
207
220
|
items4a: "*",
|
|
221
|
+
tjson: "*",
|
|
208
222
|
// items_with_media_cols: "*",
|
|
209
223
|
items_multi: "*",
|
|
210
224
|
v_items: "*",
|
package/tests/server/index.ts
CHANGED
|
@@ -85,6 +85,19 @@ function dd(){
|
|
|
85
85
|
t2: { label: { en: "en_t2" } },
|
|
86
86
|
}
|
|
87
87
|
},
|
|
88
|
+
tjson: {
|
|
89
|
+
dropIfExists: true,
|
|
90
|
+
columns: {
|
|
91
|
+
json: { jsonbSchema: {
|
|
92
|
+
a: { type: "boolean" },
|
|
93
|
+
arr: { oneOf: ["1", "2", "3"] },
|
|
94
|
+
arr1: { oneOf: [1, 2, 3] },
|
|
95
|
+
arr2: { type: "integer[]" },
|
|
96
|
+
o: { oneOfTypes: [{ o1: { type: "integer" } }, { o2: { type: "boolean" } }], optional: true },
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
},
|
|
88
101
|
lookup_col1: {
|
|
89
102
|
dropIfExists: true,
|
|
90
103
|
isLookupTable: {
|
|
@@ -232,6 +245,7 @@ function dd(){
|
|
|
232
245
|
items2: "*",
|
|
233
246
|
items3: "*",
|
|
234
247
|
items4a: "*",
|
|
248
|
+
tjson: "*",
|
|
235
249
|
// items_with_media_cols: "*",
|
|
236
250
|
items_multi: "*",
|
|
237
251
|
v_items: "*",
|