@devrev/meerkat-node 0.0.115 → 0.0.116
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/__fixtures__/test-data-with-safe-alias.js +152 -15
- package/__fixtures__/test-data-with-safe-alias.js.map +1 -1
- package/__fixtures__/test-data.js +2 -1
- package/__fixtures__/test-data.js.map +1 -1
- package/__fixtures__/with-dot-alias.js +152 -15
- package/__fixtures__/with-dot-alias.js.map +1 -1
- package/package.json +1 -1
- package/src/__fixtures__/test-data-with-safe-alias.d.ts +102 -2
- package/src/__fixtures__/test-data.d.ts +205 -5
- package/src/__fixtures__/with-dot-alias.d.ts +102 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const CREATE_TEST_TABLE = "\nCREATE TABLE orders (\n order_id INTEGER,\n customer_id VARCHAR,\n product_id VARCHAR,\n order_date DATE,\n order_amount FLOAT,\n vendors VARCHAR[]\n);\n";
|
|
2
|
-
export declare const INPUT_DATA_QUERY = "\nINSERT INTO orders VALUES\n(1, '1', '1', '2022-01-01', 50, ['myntra', 'amazon', 'flipkart']),\n(2, '1', '2', '2022-01-02', 80, ['myntra']),\n(3, '2', '3', '2022-02-01', 25, []),\n(4, '2', '1', '2022-03-01', 75, ['flipkart']),\n(5, '3', '1', '2022-03-02', 100, ['myntra', 'amazon', 'flipkart']),\n(6, '4', '2', '2022-04-01', 45, []),\n(7, '4', '3', '2022-05-01', 90, ['myntra', 'flipkart']),\n(8, '5', '1', '2022-05-02', 65, ['amazon', 'flipkart']),\n(9, '5', '2', '2022-05-05', 85, []),\n(10, '6', '3', '2022-06-01', 120, ['myntra', 'amazon']),\n(11, '6aa6', '3', '2024-06-01', 0, ['amazon']),\n(12, NULL, '3', '2024-07-01', 100, ['flipkart']),\n(13, '7', '6', '2024-08-01', 100, ['swiggy''s']);\n";
|
|
2
|
+
export declare const INPUT_DATA_QUERY = "\nINSERT INTO orders VALUES\n(1, '1', '1', '2022-01-01', 50, ['myntra', 'amazon', 'flipkart']),\n(2, '1', '2', '2022-01-02', 80, ['myntra']),\n(3, '2', '3', '2022-02-01', 25, []),\n(4, '2', '1', '2022-03-01', 75, ['flipkart']),\n(5, '3', '1', '2022-03-02', 100, ['myntra', 'amazon', 'flipkart']),\n(6, '4', '2', '2022-04-01', 45, []),\n(7, '4', '3', '2022-05-01', 90, ['myntra', 'flipkart']),\n(8, '5', '1', '2022-05-02', 65, ['amazon', 'flipkart']),\n(9, '5', '2', '2022-05-05', 85, []),\n(10, '6', '3', '2022-06-01', 120, ['myntra', 'amazon']),\n(11, '6aa6', '3', '2024-06-01', 0, ['amazon']),\n(12, NULL, '3', '2024-07-01', 100, ['flipkart']),\n(13, '7', '6', '2024-08-01', 100, ['swiggy''s']),\n(14, '8', '1', '2024-09-01', 50, NULL);\n";
|
|
3
3
|
export declare const TABLE_SCHEMA: {
|
|
4
4
|
name: string;
|
|
5
5
|
sql: string;
|
|
@@ -65,7 +65,7 @@ export declare const getTestData: ({ useSafeAlias }: {
|
|
|
65
65
|
}[];
|
|
66
66
|
dimensions: never[];
|
|
67
67
|
};
|
|
68
|
-
expectedOutput: {
|
|
68
|
+
expectedOutput: ({
|
|
69
69
|
order_id: number;
|
|
70
70
|
customer_id: string;
|
|
71
71
|
orders__customer_id: string;
|
|
@@ -73,7 +73,15 @@ export declare const getTestData: ({ useSafeAlias }: {
|
|
|
73
73
|
order_date: string;
|
|
74
74
|
order_amount: number;
|
|
75
75
|
vendors: string[];
|
|
76
|
-
}
|
|
76
|
+
} | {
|
|
77
|
+
order_id: number;
|
|
78
|
+
customer_id: string;
|
|
79
|
+
orders__customer_id: string;
|
|
80
|
+
product_id: string;
|
|
81
|
+
order_date: string;
|
|
82
|
+
order_amount: number;
|
|
83
|
+
vendors: null;
|
|
84
|
+
})[];
|
|
77
85
|
}[] | {
|
|
78
86
|
testName: string;
|
|
79
87
|
expectedSQL: string;
|
|
@@ -106,6 +114,15 @@ export declare const getTestData: ({ useSafeAlias }: {
|
|
|
106
114
|
orders__order_date: undefined;
|
|
107
115
|
product_id: string;
|
|
108
116
|
vendors: string[];
|
|
117
|
+
} | {
|
|
118
|
+
customer_id: string;
|
|
119
|
+
order_amount: number;
|
|
120
|
+
order_date: string;
|
|
121
|
+
order_id: number;
|
|
122
|
+
orders__customer_id: string;
|
|
123
|
+
orders__order_date: undefined;
|
|
124
|
+
product_id: string;
|
|
125
|
+
vendors: null;
|
|
109
126
|
})[];
|
|
110
127
|
}[] | {
|
|
111
128
|
testName: string;
|
|
@@ -175,6 +192,14 @@ export declare const getTestData: ({ useSafeAlias }: {
|
|
|
175
192
|
orders__order_date: string;
|
|
176
193
|
product_id: string;
|
|
177
194
|
vendors: string[];
|
|
195
|
+
} | {
|
|
196
|
+
customer_id: string;
|
|
197
|
+
order_amount: number;
|
|
198
|
+
order_date: string;
|
|
199
|
+
order_id: number;
|
|
200
|
+
orders__order_date: string;
|
|
201
|
+
product_id: string;
|
|
202
|
+
vendors: null;
|
|
178
203
|
})[];
|
|
179
204
|
}[] | {
|
|
180
205
|
testName: string;
|
|
@@ -317,6 +342,81 @@ export declare const getTestData: ({ useSafeAlias }: {
|
|
|
317
342
|
product_id: string;
|
|
318
343
|
vendors: string[];
|
|
319
344
|
}[];
|
|
345
|
+
})[] | ({
|
|
346
|
+
testName: string;
|
|
347
|
+
expectedSQL: string;
|
|
348
|
+
cubeInput: {
|
|
349
|
+
measures: string[];
|
|
350
|
+
filters: {
|
|
351
|
+
and: {
|
|
352
|
+
member: string;
|
|
353
|
+
operator: string;
|
|
354
|
+
values: string[];
|
|
355
|
+
}[];
|
|
356
|
+
}[];
|
|
357
|
+
dimensions: never[];
|
|
358
|
+
};
|
|
359
|
+
expectedOutput: ({
|
|
360
|
+
customer_id: string;
|
|
361
|
+
order_amount: number;
|
|
362
|
+
order_date: string;
|
|
363
|
+
order_id: number;
|
|
364
|
+
orders__customer_id: string;
|
|
365
|
+
orders__order_date: undefined;
|
|
366
|
+
orders__product_id: string;
|
|
367
|
+
product_id: string;
|
|
368
|
+
vendors: string[];
|
|
369
|
+
} | {
|
|
370
|
+
customer_id: null;
|
|
371
|
+
order_amount: number;
|
|
372
|
+
order_date: string;
|
|
373
|
+
order_id: number;
|
|
374
|
+
orders__customer_id: null;
|
|
375
|
+
orders__order_date: undefined;
|
|
376
|
+
orders__product_id: string;
|
|
377
|
+
product_id: string;
|
|
378
|
+
vendors: string[];
|
|
379
|
+
})[];
|
|
380
|
+
} | {
|
|
381
|
+
testName: string;
|
|
382
|
+
expectedSQL: string;
|
|
383
|
+
cubeInput: {
|
|
384
|
+
measures: string[];
|
|
385
|
+
filters: {
|
|
386
|
+
member: string;
|
|
387
|
+
operator: string;
|
|
388
|
+
values: string[];
|
|
389
|
+
}[];
|
|
390
|
+
dimensions: never[];
|
|
391
|
+
};
|
|
392
|
+
expectedOutput: ({
|
|
393
|
+
customer_id: string;
|
|
394
|
+
order_amount: number;
|
|
395
|
+
order_date: string;
|
|
396
|
+
order_id: number;
|
|
397
|
+
orders__order_date: undefined;
|
|
398
|
+
orders__vendors: string[];
|
|
399
|
+
product_id: string;
|
|
400
|
+
vendors: string[];
|
|
401
|
+
} | {
|
|
402
|
+
customer_id: null;
|
|
403
|
+
order_amount: number;
|
|
404
|
+
order_date: string;
|
|
405
|
+
order_id: number;
|
|
406
|
+
orders__order_date: undefined;
|
|
407
|
+
orders__vendors: string[];
|
|
408
|
+
product_id: string;
|
|
409
|
+
vendors: string[];
|
|
410
|
+
} | {
|
|
411
|
+
customer_id: string;
|
|
412
|
+
order_amount: number;
|
|
413
|
+
order_date: string;
|
|
414
|
+
order_id: number;
|
|
415
|
+
orders__order_date: undefined;
|
|
416
|
+
orders__vendors: null;
|
|
417
|
+
product_id: string;
|
|
418
|
+
vendors: null;
|
|
419
|
+
})[];
|
|
320
420
|
})[])[] | ({
|
|
321
421
|
testName: string;
|
|
322
422
|
expectedSQL: string;
|
|
@@ -361,7 +461,7 @@ export declare const getTestData: ({ useSafeAlias }: {
|
|
|
361
461
|
}[];
|
|
362
462
|
dimensions: never[];
|
|
363
463
|
};
|
|
364
|
-
expectedOutput: {
|
|
464
|
+
expectedOutput: ({
|
|
365
465
|
order_id: number;
|
|
366
466
|
customer_id: string;
|
|
367
467
|
'orders.customer_id': string;
|
|
@@ -369,7 +469,15 @@ export declare const getTestData: ({ useSafeAlias }: {
|
|
|
369
469
|
order_date: string;
|
|
370
470
|
order_amount: number;
|
|
371
471
|
vendors: string[];
|
|
372
|
-
}
|
|
472
|
+
} | {
|
|
473
|
+
order_id: number;
|
|
474
|
+
customer_id: string;
|
|
475
|
+
'orders.customer_id': string;
|
|
476
|
+
product_id: string;
|
|
477
|
+
order_date: string;
|
|
478
|
+
order_amount: number;
|
|
479
|
+
vendors: null;
|
|
480
|
+
})[];
|
|
373
481
|
}[] | {
|
|
374
482
|
testName: string;
|
|
375
483
|
expectedSQL: string;
|
|
@@ -402,6 +510,15 @@ export declare const getTestData: ({ useSafeAlias }: {
|
|
|
402
510
|
'orders.order_date': undefined;
|
|
403
511
|
product_id: string;
|
|
404
512
|
vendors: string[];
|
|
513
|
+
} | {
|
|
514
|
+
customer_id: string;
|
|
515
|
+
order_amount: number;
|
|
516
|
+
order_date: string;
|
|
517
|
+
order_id: number;
|
|
518
|
+
'orders.customer_id': string;
|
|
519
|
+
'orders.order_date': undefined;
|
|
520
|
+
product_id: string;
|
|
521
|
+
vendors: null;
|
|
405
522
|
})[];
|
|
406
523
|
}[] | {
|
|
407
524
|
testName: string;
|
|
@@ -471,6 +588,14 @@ export declare const getTestData: ({ useSafeAlias }: {
|
|
|
471
588
|
'orders.order_date': string;
|
|
472
589
|
product_id: string;
|
|
473
590
|
vendors: string[];
|
|
591
|
+
} | {
|
|
592
|
+
customer_id: string;
|
|
593
|
+
order_amount: number;
|
|
594
|
+
order_date: string;
|
|
595
|
+
order_id: number;
|
|
596
|
+
'orders.order_date': string;
|
|
597
|
+
product_id: string;
|
|
598
|
+
vendors: null;
|
|
474
599
|
})[];
|
|
475
600
|
}[] | {
|
|
476
601
|
testName: string;
|
|
@@ -613,4 +738,79 @@ export declare const getTestData: ({ useSafeAlias }: {
|
|
|
613
738
|
product_id: string;
|
|
614
739
|
vendors: string[];
|
|
615
740
|
}[];
|
|
741
|
+
})[] | ({
|
|
742
|
+
testName: string;
|
|
743
|
+
expectedSQL: string;
|
|
744
|
+
cubeInput: {
|
|
745
|
+
measures: string[];
|
|
746
|
+
filters: {
|
|
747
|
+
and: {
|
|
748
|
+
member: string;
|
|
749
|
+
operator: string;
|
|
750
|
+
values: string[];
|
|
751
|
+
}[];
|
|
752
|
+
}[];
|
|
753
|
+
dimensions: never[];
|
|
754
|
+
};
|
|
755
|
+
expectedOutput: ({
|
|
756
|
+
customer_id: string;
|
|
757
|
+
order_amount: number;
|
|
758
|
+
order_date: string;
|
|
759
|
+
order_id: number;
|
|
760
|
+
'orders.customer_id': string;
|
|
761
|
+
'orders.order_date': undefined;
|
|
762
|
+
'orders.product_id': string;
|
|
763
|
+
product_id: string;
|
|
764
|
+
vendors: string[];
|
|
765
|
+
} | {
|
|
766
|
+
customer_id: null;
|
|
767
|
+
order_amount: number;
|
|
768
|
+
order_date: string;
|
|
769
|
+
order_id: number;
|
|
770
|
+
'orders.customer_id': null;
|
|
771
|
+
'orders.order_date': undefined;
|
|
772
|
+
'orders.product_id': string;
|
|
773
|
+
product_id: string;
|
|
774
|
+
vendors: string[];
|
|
775
|
+
})[];
|
|
776
|
+
} | {
|
|
777
|
+
testName: string;
|
|
778
|
+
expectedSQL: string;
|
|
779
|
+
cubeInput: {
|
|
780
|
+
measures: string[];
|
|
781
|
+
filters: {
|
|
782
|
+
member: string;
|
|
783
|
+
operator: string;
|
|
784
|
+
values: string[];
|
|
785
|
+
}[];
|
|
786
|
+
dimensions: never[];
|
|
787
|
+
};
|
|
788
|
+
expectedOutput: ({
|
|
789
|
+
customer_id: string;
|
|
790
|
+
order_amount: number;
|
|
791
|
+
order_date: string;
|
|
792
|
+
order_id: number;
|
|
793
|
+
'orders.order_date': undefined;
|
|
794
|
+
'orders.vendors': string[];
|
|
795
|
+
product_id: string;
|
|
796
|
+
vendors: string[];
|
|
797
|
+
} | {
|
|
798
|
+
customer_id: null;
|
|
799
|
+
order_amount: number;
|
|
800
|
+
order_date: string;
|
|
801
|
+
order_id: number;
|
|
802
|
+
'orders.order_date': undefined;
|
|
803
|
+
'orders.vendors': string[];
|
|
804
|
+
product_id: string;
|
|
805
|
+
vendors: string[];
|
|
806
|
+
} | {
|
|
807
|
+
customer_id: string;
|
|
808
|
+
order_amount: number;
|
|
809
|
+
order_date: string;
|
|
810
|
+
order_id: number;
|
|
811
|
+
'orders.order_date': undefined;
|
|
812
|
+
'orders.vendors': null;
|
|
813
|
+
product_id: string;
|
|
814
|
+
vendors: null;
|
|
815
|
+
})[];
|
|
616
816
|
})[])[];
|
|
@@ -42,7 +42,7 @@ export declare const WITH_DOT_ALIAS_TEST_DATA: ({
|
|
|
42
42
|
}[];
|
|
43
43
|
dimensions: never[];
|
|
44
44
|
};
|
|
45
|
-
expectedOutput: {
|
|
45
|
+
expectedOutput: ({
|
|
46
46
|
order_id: number;
|
|
47
47
|
customer_id: string;
|
|
48
48
|
'orders.customer_id': string;
|
|
@@ -50,7 +50,15 @@ export declare const WITH_DOT_ALIAS_TEST_DATA: ({
|
|
|
50
50
|
order_date: string;
|
|
51
51
|
order_amount: number;
|
|
52
52
|
vendors: string[];
|
|
53
|
-
}
|
|
53
|
+
} | {
|
|
54
|
+
order_id: number;
|
|
55
|
+
customer_id: string;
|
|
56
|
+
'orders.customer_id': string;
|
|
57
|
+
product_id: string;
|
|
58
|
+
order_date: string;
|
|
59
|
+
order_amount: number;
|
|
60
|
+
vendors: null;
|
|
61
|
+
})[];
|
|
54
62
|
}[] | {
|
|
55
63
|
testName: string;
|
|
56
64
|
expectedSQL: string;
|
|
@@ -83,6 +91,15 @@ export declare const WITH_DOT_ALIAS_TEST_DATA: ({
|
|
|
83
91
|
'orders.order_date': undefined;
|
|
84
92
|
product_id: string;
|
|
85
93
|
vendors: string[];
|
|
94
|
+
} | {
|
|
95
|
+
customer_id: string;
|
|
96
|
+
order_amount: number;
|
|
97
|
+
order_date: string;
|
|
98
|
+
order_id: number;
|
|
99
|
+
'orders.customer_id': string;
|
|
100
|
+
'orders.order_date': undefined;
|
|
101
|
+
product_id: string;
|
|
102
|
+
vendors: null;
|
|
86
103
|
})[];
|
|
87
104
|
}[] | {
|
|
88
105
|
testName: string;
|
|
@@ -152,6 +169,14 @@ export declare const WITH_DOT_ALIAS_TEST_DATA: ({
|
|
|
152
169
|
'orders.order_date': string;
|
|
153
170
|
product_id: string;
|
|
154
171
|
vendors: string[];
|
|
172
|
+
} | {
|
|
173
|
+
customer_id: string;
|
|
174
|
+
order_amount: number;
|
|
175
|
+
order_date: string;
|
|
176
|
+
order_id: number;
|
|
177
|
+
'orders.order_date': string;
|
|
178
|
+
product_id: string;
|
|
179
|
+
vendors: null;
|
|
155
180
|
})[];
|
|
156
181
|
}[] | {
|
|
157
182
|
testName: string;
|
|
@@ -294,4 +319,79 @@ export declare const WITH_DOT_ALIAS_TEST_DATA: ({
|
|
|
294
319
|
product_id: string;
|
|
295
320
|
vendors: string[];
|
|
296
321
|
}[];
|
|
322
|
+
})[] | ({
|
|
323
|
+
testName: string;
|
|
324
|
+
expectedSQL: string;
|
|
325
|
+
cubeInput: {
|
|
326
|
+
measures: string[];
|
|
327
|
+
filters: {
|
|
328
|
+
and: {
|
|
329
|
+
member: string;
|
|
330
|
+
operator: string;
|
|
331
|
+
values: string[];
|
|
332
|
+
}[];
|
|
333
|
+
}[];
|
|
334
|
+
dimensions: never[];
|
|
335
|
+
};
|
|
336
|
+
expectedOutput: ({
|
|
337
|
+
customer_id: string;
|
|
338
|
+
order_amount: number;
|
|
339
|
+
order_date: string;
|
|
340
|
+
order_id: number;
|
|
341
|
+
'orders.customer_id': string;
|
|
342
|
+
'orders.order_date': undefined;
|
|
343
|
+
'orders.product_id': string;
|
|
344
|
+
product_id: string;
|
|
345
|
+
vendors: string[];
|
|
346
|
+
} | {
|
|
347
|
+
customer_id: null;
|
|
348
|
+
order_amount: number;
|
|
349
|
+
order_date: string;
|
|
350
|
+
order_id: number;
|
|
351
|
+
'orders.customer_id': null;
|
|
352
|
+
'orders.order_date': undefined;
|
|
353
|
+
'orders.product_id': string;
|
|
354
|
+
product_id: string;
|
|
355
|
+
vendors: string[];
|
|
356
|
+
})[];
|
|
357
|
+
} | {
|
|
358
|
+
testName: string;
|
|
359
|
+
expectedSQL: string;
|
|
360
|
+
cubeInput: {
|
|
361
|
+
measures: string[];
|
|
362
|
+
filters: {
|
|
363
|
+
member: string;
|
|
364
|
+
operator: string;
|
|
365
|
+
values: string[];
|
|
366
|
+
}[];
|
|
367
|
+
dimensions: never[];
|
|
368
|
+
};
|
|
369
|
+
expectedOutput: ({
|
|
370
|
+
customer_id: string;
|
|
371
|
+
order_amount: number;
|
|
372
|
+
order_date: string;
|
|
373
|
+
order_id: number;
|
|
374
|
+
'orders.order_date': undefined;
|
|
375
|
+
'orders.vendors': string[];
|
|
376
|
+
product_id: string;
|
|
377
|
+
vendors: string[];
|
|
378
|
+
} | {
|
|
379
|
+
customer_id: null;
|
|
380
|
+
order_amount: number;
|
|
381
|
+
order_date: string;
|
|
382
|
+
order_id: number;
|
|
383
|
+
'orders.order_date': undefined;
|
|
384
|
+
'orders.vendors': string[];
|
|
385
|
+
product_id: string;
|
|
386
|
+
vendors: string[];
|
|
387
|
+
} | {
|
|
388
|
+
customer_id: string;
|
|
389
|
+
order_amount: number;
|
|
390
|
+
order_date: string;
|
|
391
|
+
order_id: number;
|
|
392
|
+
'orders.order_date': undefined;
|
|
393
|
+
'orders.vendors': null;
|
|
394
|
+
product_id: string;
|
|
395
|
+
vendors: null;
|
|
396
|
+
})[];
|
|
297
397
|
})[])[];
|