@@ -8,11 +8,11 @@ test('list', async () => {
8
8
table_id : expect . any ( Number ) ,
9
9
} ,
10
10
`
11
- Object {
11
+ {
12
12
"comment": null,
13
13
"data_type": "bigint",
14
14
"default_value": null,
15
- "enums": Array [],
15
+ "enums": [],
16
16
"format": "int8",
17
17
"id": StringMatching /\\^\\\\d\\+\\\\\\.3\\$/,
18
18
"identity_generation": null,
@@ -43,20 +43,21 @@ test('list from a single table', async () => {
43
43
id : expect . stringMatching ( / ^ \d + \. \d + $ / ) ,
44
44
table_id : expect . any ( Number ) ,
45
45
} ,
46
+
46
47
{
47
48
id : expect . stringMatching ( / ^ \d + \. \d + $ / ) ,
48
49
table_id : expect . any ( Number ) ,
49
50
} ,
50
51
] ,
51
52
} ,
52
53
`
53
- Object {
54
- "data": Array [
55
- Object {
54
+ {
55
+ "data": [
56
+ {
56
57
"comment": null,
57
58
"data_type": "text",
58
59
"default_value": null,
59
- "enums": Array [],
60
+ "enums": [],
60
61
"format": "text",
61
62
"id": StringMatching /\\^\\\\d\\+\\\\\\.\\\\d\\+\\$/,
62
63
"identity_generation": null,
@@ -71,11 +72,11 @@ test('list from a single table', async () => {
71
72
"table": "t",
72
73
"table_id": Any<Number>,
73
74
},
74
- Object {
75
+ {
75
76
"comment": null,
76
77
"data_type": "text",
77
78
"default_value": null,
78
- "enums": Array [],
79
+ "enums": [],
79
80
"format": "text",
80
81
"id": StringMatching /\\^\\\\d\\+\\\\\\.\\\\d\\+\\$/,
81
82
"identity_generation": null,
@@ -147,12 +148,12 @@ test('retrieve, create, update, delete', async () => {
147
148
expect ( res ) . toMatchInlineSnapshot (
148
149
{ data : { id : expect . stringMatching ( / ^ \d + \. 1 $ / ) , table_id : expect . any ( Number ) } } ,
149
150
`
150
- Object {
151
- "data": Object {
151
+ {
152
+ "data": {
152
153
"comment": "foo",
153
154
"data_type": "smallint",
154
155
"default_value": "'42'::smallint",
155
- "enums": Array [],
156
+ "enums": [],
156
157
"format": "int2",
157
158
"id": StringMatching /\\^\\\\d\\+\\\\\\.1\\$/,
158
159
"identity_generation": null,
@@ -177,12 +178,12 @@ test('retrieve, create, update, delete', async () => {
177
178
data : { id : expect . stringMatching ( / ^ \d + \. 1 $ / ) , table_id : expect . any ( Number ) } ,
178
179
} ,
179
180
`
180
- Object {
181
- "data": Object {
181
+ {
182
+ "data": {
182
183
"comment": "foo",
183
184
"data_type": "smallint",
184
185
"default_value": "'42'::smallint",
185
- "enums": Array [],
186
+ "enums": [],
186
187
"format": "int2",
187
188
"id": StringMatching /\\^\\\\d\\+\\\\\\.1\\$/,
188
189
"identity_generation": null,
@@ -215,12 +216,12 @@ test('retrieve, create, update, delete', async () => {
215
216
data : { id : expect . stringMatching ( / ^ \d + \. 1 $ / ) , table_id : expect . any ( Number ) } ,
216
217
} ,
217
218
`
218
- Object {
219
- "data": Object {
219
+ {
220
+ "data": {
220
221
"comment": "bar",
221
222
"data_type": "integer",
222
223
"default_value": null,
223
- "enums": Array [],
224
+ "enums": [],
224
225
"format": "int4",
225
226
"id": StringMatching /\\^\\\\d\\+\\\\\\.1\\$/,
226
227
"identity_generation": "ALWAYS",
@@ -245,12 +246,12 @@ test('retrieve, create, update, delete', async () => {
245
246
data : { id : expect . stringMatching ( / ^ \d + \. 1 $ / ) , table_id : expect . any ( Number ) } ,
246
247
} ,
247
248
`
248
- Object {
249
- "data": Object {
249
+ {
250
+ "data": {
250
251
"comment": "bar",
251
252
"data_type": "integer",
252
253
"default_value": null,
253
- "enums": Array [],
254
+ "enums": [],
254
255
"format": "int4",
255
256
"id": StringMatching /\\^\\\\d\\+\\\\\\.1\\$/,
256
257
"identity_generation": "ALWAYS",
@@ -290,11 +291,11 @@ test('enum column with quoted name', async () => {
290
291
table_id : expect . any ( Number ) ,
291
292
} ,
292
293
`
293
- Object {
294
+ {
294
295
"comment": null,
295
296
"data_type": "USER-DEFINED",
296
297
"default_value": null,
297
- "enums": Array [
298
+ "enums": [
298
299
"v",
299
300
],
300
301
"format": "T",
@@ -335,9 +336,9 @@ WHERE i.indrelid = '${testTable!.name}'::regclass
335
336
AND i.indisprimary;
336
337
` )
337
338
expect ( res ) . toMatchInlineSnapshot ( `
338
- Object {
339
- "data": Array [
340
- Object {
339
+ {
340
+ "data": [
341
+ {
341
342
"attname": "c",
342
343
},
343
344
],
@@ -367,9 +368,9 @@ WHERE i.indrelid = '${testTable!.name}'::regclass
367
368
AND i.indisunique;
368
369
` )
369
370
expect ( res ) . toMatchInlineSnapshot ( `
370
- Object {
371
- "data": Array [
372
- Object {
371
+ {
372
+ "data": [
373
+ {
373
374
"attname": "c",
374
375
},
375
376
],
@@ -396,12 +397,12 @@ test('array column', async () => {
396
397
} ,
397
398
} ,
398
399
`
399
- Object {
400
- "data": Object {
400
+ {
401
+ "data": {
401
402
"comment": null,
402
403
"data_type": "ARRAY",
403
404
"default_value": null,
404
- "enums": Array [],
405
+ "enums": [],
405
406
"format": "_int2",
406
407
"id": StringMatching /\\^\\\\d\\+\\\\\\.1\\$/,
407
408
"identity_generation": null,
@@ -442,12 +443,12 @@ test('column with default value', async () => {
442
443
} ,
443
444
} ,
444
445
`
445
- Object {
446
- "data": Object {
446
+ {
447
+ "data": {
447
448
"comment": null,
448
449
"data_type": "timestamp with time zone",
449
450
"default_value": "now()",
450
- "enums": Array [],
451
+ "enums": [],
451
452
"format": "timestamptz",
452
453
"id": StringMatching /\\^\\\\d\\+\\\\\\.1\\$/,
453
454
"identity_generation": null,
@@ -487,9 +488,9 @@ SELECT pg_get_constraintdef((
487
488
));
488
489
` )
489
490
expect ( res ) . toMatchInlineSnapshot ( `
490
- Object {
491
- "data": Array [
492
- Object {
491
+ {
492
+ "data": [
493
+ {
493
494
"pg_get_constraintdef": null,
494
495
},
495
496
],
@@ -519,12 +520,12 @@ test('update with name unchanged', async () => {
519
520
} ,
520
521
} ,
521
522
`
522
- Object {
523
- "data": Object {
523
+ {
524
+ "data": {
524
525
"comment": null,
525
526
"data_type": "smallint",
526
527
"default_value": null,
527
- "enums": Array [],
528
+ "enums": [],
528
529
"format": "int2",
529
530
"id": StringMatching /\\^\\\\d\\+\\\\\\.1\\$/,
530
531
"identity_generation": null,
@@ -566,12 +567,12 @@ test('update with array types', async () => {
566
567
} ,
567
568
} ,
568
569
`
569
- Object {
570
- "data": Object {
570
+ {
571
+ "data": {
571
572
"comment": null,
572
573
"data_type": "ARRAY",
573
574
"default_value": null,
574
- "enums": Array [],
575
+ "enums": [],
575
576
"format": "_text",
576
577
"id": StringMatching /\\^\\\\d\\+\\\\\\.1\\$/,
577
578
"identity_generation": null,
@@ -613,12 +614,12 @@ test('update with incompatible types', async () => {
613
614
} ,
614
615
} ,
615
616
`
616
- Object {
617
- "data": Object {
617
+ {
618
+ "data": {
618
619
"comment": null,
619
620
"data_type": "integer",
620
621
"default_value": null,
621
- "enums": Array [],
622
+ "enums": [],
622
623
"format": "int4",
623
624
"id": StringMatching /\\^\\\\d\\+\\\\\\.1\\$/,
624
625
"identity_generation": null,
@@ -659,12 +660,12 @@ test('update is_unique', async () => {
659
660
} ,
660
661
} ,
661
662
`
662
- Object {
663
- "data": Object {
663
+ {
664
+ "data": {
664
665
"comment": null,
665
666
"data_type": "text",
666
667
"default_value": null,
667
- "enums": Array [],
668
+ "enums": [],
668
669
"format": "text",
669
670
"id": StringMatching /\\^\\\\d\\+\\\\\\.1\\$/,
670
671
"identity_generation": null,
@@ -692,12 +693,12 @@ test('update is_unique', async () => {
692
693
} ,
693
694
} ,
694
695
`
695
- Object {
696
- "data": Object {
696
+ {
697
+ "data": {
697
698
"comment": null,
698
699
"data_type": "text",
699
700
"default_value": null,
700
- "enums": Array [],
701
+ "enums": [],
701
702
"format": "text",
702
703
"id": StringMatching /\\^\\\\d\\+\\\\\\.1\\$/,
703
704
"identity_generation": null,
@@ -740,12 +741,12 @@ test('alter column to type with uppercase', async () => {
740
741
} ,
741
742
} ,
742
743
`
743
- Object {
744
- "data": Object {
744
+ {
745
+ "data": {
745
746
"comment": null,
746
747
"data_type": "USER-DEFINED",
747
748
"default_value": null,
748
- "enums": Array [],
749
+ "enums": [],
749
750
"format": "T",
750
751
"id": StringMatching /\\^\\\\d\\+\\\\\\.1\\$/,
751
752
"identity_generation": null,
@@ -786,12 +787,12 @@ test('enums are populated in enum array columns', async () => {
786
787
} ,
787
788
} ,
788
789
`
789
- Object {
790
- "data": Object {
790
+ {
791
+ "data": {
791
792
"comment": null,
792
793
"data_type": "ARRAY",
793
794
"default_value": null,
794
- "enums": Array [
795
+ "enums": [
795
796
"a",
796
797
],
797
798
"format": "_test_enum",
@@ -839,12 +840,12 @@ create table public.t (
839
840
} ,
840
841
} ,
841
842
`
842
- Object {
843
- "data": Object {
843
+ {
844
+ "data": {
844
845
"comment": null,
845
846
"data_type": "bigint",
846
847
"default_value": null,
847
- "enums": Array [],
848
+ "enums": [],
848
849
"format": "int8",
849
850
"id": StringMatching /\\^\\\\d\\+\\\\\\.1\\$/,
850
851
"identity_generation": null,
@@ -870,9 +871,9 @@ create table public.t (
870
871
name : 't_id' ,
871
872
} )
872
873
expect ( res ) . toMatchInlineSnapshot ( `
873
- Object {
874
+ {
874
875
"data": null,
875
- "error": Object {
876
+ "error": {
876
877
"message": "Cannot find a column named t_id in table public.t",
877
878
},
878
879
}
0 commit comments