@balena/abstract-sql-compiler 10.2.4 → 10.2.5
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/.versionbot/CHANGELOG.yml +13 -1
- package/CHANGELOG.md +4 -0
- package/package.json +2 -2
- package/test/odata/expand.js +79 -78
- package/test/odata/filterby.js +36 -36
- package/test/odata/orderby.js +8 -8
- package/test/odata/paging.js +3 -3
- package/test/odata/resource_parsing.js +40 -38
- package/test/odata/select.js +9 -9
- package/test/odata/stress.js +6 -5
- package/test/odata/test.ts +292 -0
- package/test/odata/test.js +0 -138
@@ -1,3 +1,15 @@
|
|
1
|
+
- commits:
|
2
|
+
- subject: "Tests: convert test/odata/test to typescript"
|
3
|
+
hash: c00e9270589111b882d4894fc437dd8b0343ecce
|
4
|
+
body: ""
|
5
|
+
footer:
|
6
|
+
Change-type: patch
|
7
|
+
change-type: patch
|
8
|
+
author: Pagan Gazzard
|
9
|
+
nested: []
|
10
|
+
version: 10.2.5
|
11
|
+
title: ""
|
12
|
+
date: 2025-04-06T22:37:16.638Z
|
1
13
|
- commits:
|
2
14
|
- subject: Update dev dependencies
|
3
15
|
hash: 703263fa73aff2253d1a931a5946a027d20c9ff6
|
@@ -9,7 +21,7 @@
|
|
9
21
|
nested: []
|
10
22
|
version: 10.2.4
|
11
23
|
title: ""
|
12
|
-
date: 2025-04-
|
24
|
+
date: 2025-04-04T14:00:21.240Z
|
13
25
|
- commits:
|
14
26
|
- subject: "Tests: convert test/abstract-sql/case-when-else.js to typescript"
|
15
27
|
hash: 0edb21cc4ee30ead2a6eeb290623f3a0adc7a0fe
|
package/CHANGELOG.md
CHANGED
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file
|
|
4
4
|
automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY!
|
5
5
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
6
6
|
|
7
|
+
## 10.2.5 - 2025-04-06
|
8
|
+
|
9
|
+
* Tests: convert test/odata/test to typescript [Pagan Gazzard]
|
10
|
+
|
7
11
|
## 10.2.4 - 2025-04-04
|
8
12
|
|
9
13
|
* Update dev dependencies [Pagan Gazzard]
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@balena/abstract-sql-compiler",
|
3
|
-
"version": "10.2.
|
3
|
+
"version": "10.2.5",
|
4
4
|
"description": "A translator for abstract sql into sql.",
|
5
5
|
"type": "commonjs",
|
6
6
|
"main": "out/AbstractSQLCompiler.js",
|
@@ -64,6 +64,6 @@
|
|
64
64
|
"npm": ">=10.7.0"
|
65
65
|
},
|
66
66
|
"versionist": {
|
67
|
-
"publishedAt": "2025-04-
|
67
|
+
"publishedAt": "2025-04-06T22:37:17.012Z"
|
68
68
|
}
|
69
69
|
}
|
package/test/odata/expand.js
CHANGED
@@ -18,9 +18,9 @@ const websqlAgg = mysqlAgg;
|
|
18
18
|
(field) => field === '"pilot"."licence"',
|
19
19
|
).join(', ');
|
20
20
|
const testFunc = (aggFunc, fields) => (result, sqlEquals) => {
|
21
|
-
it('should select from pilot.*, aggregated licence', () =>
|
22
|
-
sqlEquals(
|
23
|
-
result
|
21
|
+
it('should select from pilot.*, aggregated licence', () => {
|
22
|
+
sqlEquals?.(
|
23
|
+
result,
|
24
24
|
`\
|
25
25
|
SELECT (
|
26
26
|
SELECT ${aggFunc('"pilot.licence".*')} AS "licence"
|
@@ -31,16 +31,17 @@ SELECT (
|
|
31
31
|
) AS "pilot.licence"
|
32
32
|
) AS "licence", ${remainingPilotFields}
|
33
33
|
FROM "pilot"`,
|
34
|
-
)
|
34
|
+
);
|
35
|
+
});
|
35
36
|
};
|
36
37
|
const url = '/pilot?$expand=licence';
|
37
38
|
const urlCount = '/pilot?$expand=licence/$count';
|
38
39
|
test.postgres(url, testFunc(postgresAgg, aliasLicenceFields.join(', ')));
|
39
40
|
test.postgres(urlCount, testFunc(postgresAgg, 'COUNT(*) AS "$count"'));
|
40
|
-
test.mysql.
|
41
|
-
test.mysql.
|
42
|
-
test.websql.
|
43
|
-
test.websql.
|
41
|
+
test.mysql.fail(url, testFunc(mysqlAgg, aliasLicenceFields.join(', ')));
|
42
|
+
test.mysql.fail(urlCount, testFunc(mysqlAgg, 'COUNT(*) AS "$count"'));
|
43
|
+
test.websql.fail(url, testFunc(websqlAgg, aliasLicenceFields.join(', ')));
|
44
|
+
test.websql.fail(urlCount, testFunc(websqlAgg, 'COUNT(*) AS "$count"'));
|
44
45
|
})();
|
45
46
|
|
46
47
|
(function () {
|
@@ -50,8 +51,8 @@ FROM "pilot"`,
|
|
50
51
|
).join(', ');
|
51
52
|
const testFunc = (aggFunc) => (result, sqlEquals) => {
|
52
53
|
it('should select from pilot.*, aggregated(pilot-can fly-plane, aggregated plane)', () => {
|
53
|
-
sqlEquals(
|
54
|
-
result
|
54
|
+
sqlEquals?.(
|
55
|
+
result,
|
55
56
|
`\
|
56
57
|
SELECT (
|
57
58
|
SELECT ${aggFunc('"pilot.pilot-can fly-plane".*')} AS "can_fly__plane"
|
@@ -78,8 +79,8 @@ FROM "pilot"`,
|
|
78
79
|
'/pilot?$expand=can_fly__plane($expand=plane)',
|
79
80
|
]) {
|
80
81
|
test.postgres(url, testFunc(postgresAgg));
|
81
|
-
test.mysql.
|
82
|
-
test.websql.
|
82
|
+
test.mysql.fail(url, testFunc(mysqlAgg));
|
83
|
+
test.websql.fail(url, testFunc(websqlAgg));
|
83
84
|
}
|
84
85
|
})();
|
85
86
|
|
@@ -94,8 +95,8 @@ FROM "pilot"`,
|
|
94
95
|
).join(', ');
|
95
96
|
const testFunc = (aggFunc) => (result, sqlEquals) => {
|
96
97
|
it('should select from pilot.*, aggregated(pilot-can fly-plane, aggregated plane), aggregated licence', () => {
|
97
|
-
sqlEquals(
|
98
|
-
result
|
98
|
+
sqlEquals?.(
|
99
|
+
result,
|
99
100
|
`\
|
100
101
|
SELECT (
|
101
102
|
SELECT ${aggFunc('"pilot.pilot-can fly-plane".*')} AS "can_fly__plane"
|
@@ -129,16 +130,16 @@ FROM "pilot"`,
|
|
129
130
|
'/pilot?$expand=can_fly__plane($expand=plane),licence',
|
130
131
|
]) {
|
131
132
|
test.postgres(url, testFunc(postgresAgg));
|
132
|
-
test.mysql.
|
133
|
-
test.websql.
|
133
|
+
test.mysql.fail(url, testFunc(mysqlAgg));
|
134
|
+
test.websql.fail(url, testFunc(websqlAgg));
|
134
135
|
}
|
135
136
|
})();
|
136
137
|
|
137
138
|
(function () {
|
138
139
|
const testFunc = (aggFunc) => (result, sqlEquals) => {
|
139
140
|
it('should select from pilot.*, aggregated(pilot-can fly-plane, aggregated plane), aggregated licence', () => {
|
140
|
-
sqlEquals(
|
141
|
-
result
|
141
|
+
sqlEquals?.(
|
142
|
+
result,
|
142
143
|
`\
|
143
144
|
SELECT (
|
144
145
|
SELECT ${aggFunc('"pilot.licence".*')} AS "licence"
|
@@ -154,8 +155,8 @@ FROM "pilot"`,
|
|
154
155
|
};
|
155
156
|
const url = '/pilot?$select=licence&$expand=licence';
|
156
157
|
test.postgres(url, testFunc(postgresAgg));
|
157
|
-
test.mysql.
|
158
|
-
test.websql.
|
158
|
+
test.mysql.fail(url, testFunc(mysqlAgg));
|
159
|
+
test.websql.fail(url, testFunc(websqlAgg));
|
159
160
|
})();
|
160
161
|
|
161
162
|
(function () {
|
@@ -165,8 +166,8 @@ FROM "pilot"`,
|
|
165
166
|
).join(', ');
|
166
167
|
const testFunc = (aggFunc) => (result, sqlEquals) => {
|
167
168
|
it('should select from pilot.*, aggregated(pilot-can fly-plane, aggregated plane)', () => {
|
168
|
-
sqlEquals(
|
169
|
-
result
|
169
|
+
sqlEquals?.(
|
170
|
+
result,
|
170
171
|
`\
|
171
172
|
SELECT (
|
172
173
|
SELECT ${aggFunc('"pilot.pilot-can fly-plane".*')} AS "can_fly__plane"
|
@@ -193,8 +194,8 @@ FROM "pilot"`,
|
|
193
194
|
'/pilot?$select=id&$expand=can_fly__plane($expand=plane)',
|
194
195
|
]) {
|
195
196
|
test.postgres(url, testFunc(postgresAgg));
|
196
|
-
test.mysql.
|
197
|
-
test.websql.
|
197
|
+
test.mysql.fail(url, testFunc(mysqlAgg));
|
198
|
+
test.websql.fail(url, testFunc(websqlAgg));
|
198
199
|
}
|
199
200
|
})();
|
200
201
|
|
@@ -205,8 +206,8 @@ FROM "pilot"`,
|
|
205
206
|
).join(', ');
|
206
207
|
const testFunc = (aggFunc) => (result, sqlEquals) => {
|
207
208
|
it('should select from pilot.*, aggregated(pilot-can fly-plane, aggregated plane), aggregated licence', () => {
|
208
|
-
sqlEquals(
|
209
|
-
result
|
209
|
+
sqlEquals?.(
|
210
|
+
result,
|
210
211
|
`\
|
211
212
|
SELECT (
|
212
213
|
SELECT ${aggFunc('"pilot.pilot-can fly-plane".*')} AS "can_fly__plane"
|
@@ -240,16 +241,16 @@ FROM "pilot"`,
|
|
240
241
|
'/pilot?$select=id,licence&$expand=can_fly__plane($expand=plane),licence',
|
241
242
|
]) {
|
242
243
|
test.postgres(url, testFunc(postgresAgg));
|
243
|
-
test.mysql.
|
244
|
-
test.websql.
|
244
|
+
test.mysql.fail(url, testFunc(mysqlAgg));
|
245
|
+
test.websql.fail(url, testFunc(websqlAgg));
|
245
246
|
}
|
246
247
|
})();
|
247
248
|
|
248
249
|
(function () {
|
249
250
|
const testFunc = (aggFunc) => (result, sqlEquals) => {
|
250
251
|
it('should select from pilot.*, aggregated(pilot-can fly-plane, aggregated plane)', () => {
|
251
|
-
sqlEquals(
|
252
|
-
result
|
252
|
+
sqlEquals?.(
|
253
|
+
result,
|
253
254
|
`\
|
254
255
|
SELECT (
|
255
256
|
SELECT ${aggFunc('"pilot.pilot-can fly-plane".*')} AS "can_fly__plane"
|
@@ -265,8 +266,8 @@ FROM "pilot"`,
|
|
265
266
|
};
|
266
267
|
const url = '/pilot?$expand=can_fly__plane($select=id)';
|
267
268
|
test.postgres(url, testFunc(postgresAgg));
|
268
|
-
test.mysql.
|
269
|
-
test.websql.
|
269
|
+
test.mysql.fail(url, testFunc(mysqlAgg));
|
270
|
+
test.websql.fail(url, testFunc(websqlAgg));
|
270
271
|
})();
|
271
272
|
|
272
273
|
(function () {
|
@@ -276,8 +277,8 @@ FROM "pilot"`,
|
|
276
277
|
).join(', ');
|
277
278
|
const testFunc = (aggFunc, fields) => (result, sqlEquals) => {
|
278
279
|
it('should select from pilot.*, aggregated licence', () => {
|
279
|
-
sqlEquals(
|
280
|
-
result
|
280
|
+
sqlEquals?.(
|
281
|
+
result,
|
281
282
|
`\
|
282
283
|
SELECT (
|
283
284
|
SELECT ${aggFunc('"pilot.licence".*')} AS "licence"
|
@@ -306,25 +307,25 @@ FROM "pilot"`,
|
|
306
307
|
[['Bind', 0]],
|
307
308
|
testFunc(postgresAgg, 'COUNT(*) AS "$count"'),
|
308
309
|
);
|
309
|
-
test.mysql.
|
310
|
+
test.mysql.fail(
|
310
311
|
url,
|
311
312
|
'GET',
|
312
313
|
[['Bind', 0]],
|
313
314
|
testFunc(mysqlAgg, aliasLicenceFields.join(', ')),
|
314
315
|
);
|
315
|
-
test.mysql.
|
316
|
+
test.mysql.fail(
|
316
317
|
urlCount,
|
317
318
|
'GET',
|
318
319
|
[['Bind', 0]],
|
319
320
|
testFunc(mysqlAgg, 'COUNT(*) AS "$count"'),
|
320
321
|
);
|
321
|
-
test.websql.
|
322
|
+
test.websql.fail(
|
322
323
|
url,
|
323
324
|
'GET',
|
324
325
|
[['Bind', 0]],
|
325
326
|
testFunc(websqlAgg, aliasLicenceFields.join(', ')),
|
326
327
|
);
|
327
|
-
test.websql.
|
328
|
+
test.websql.fail(
|
328
329
|
urlCount,
|
329
330
|
'GET',
|
330
331
|
[['Bind', 0]],
|
@@ -339,8 +340,8 @@ FROM "pilot"`,
|
|
339
340
|
).join(', ');
|
340
341
|
const testFunc = (aggFunc) => (result, sqlEquals) => {
|
341
342
|
it('should select from pilot.*, aggregated licence', () => {
|
342
|
-
sqlEquals(
|
343
|
-
result
|
343
|
+
sqlEquals?.(
|
344
|
+
result,
|
344
345
|
`\
|
345
346
|
SELECT (
|
346
347
|
SELECT ${aggFunc('"pilot.licence".*')} AS "licence"
|
@@ -358,8 +359,8 @@ FROM "pilot"`,
|
|
358
359
|
};
|
359
360
|
const url = '/pilot?$expand=licence($filter=is_of__pilot/id eq 1)';
|
360
361
|
test.postgres(url, 'GET', [['Bind', 0]], testFunc(postgresAgg));
|
361
|
-
test.mysql.
|
362
|
-
test.websql.
|
362
|
+
test.mysql.fail(url, 'GET', [['Bind', 0]], testFunc(mysqlAgg));
|
363
|
+
test.websql.fail(url, 'GET', [['Bind', 0]], testFunc(websqlAgg));
|
363
364
|
})();
|
364
365
|
|
365
366
|
(function () {
|
@@ -369,8 +370,8 @@ FROM "pilot"`,
|
|
369
370
|
).join(', ');
|
370
371
|
const testFunc = (aggFunc) => (result, sqlEquals) => {
|
371
372
|
it('should select from pilot.*, aggregated licence', () => {
|
372
|
-
sqlEquals(
|
373
|
-
result
|
373
|
+
sqlEquals?.(
|
374
|
+
result,
|
374
375
|
`\
|
375
376
|
SELECT (
|
376
377
|
SELECT ${aggFunc('"pilot.licence".*')} AS "licence"
|
@@ -387,8 +388,8 @@ FROM "pilot"`,
|
|
387
388
|
};
|
388
389
|
const url = '/pilot?$expand=licence($orderby=id)';
|
389
390
|
test.postgres(url, testFunc(postgresAgg));
|
390
|
-
test.mysql.
|
391
|
-
test.websql.
|
391
|
+
test.mysql.fail(url, testFunc(mysqlAgg));
|
392
|
+
test.websql.fail(url, testFunc(websqlAgg));
|
392
393
|
})();
|
393
394
|
|
394
395
|
(function () {
|
@@ -398,8 +399,8 @@ FROM "pilot"`,
|
|
398
399
|
).join(', ');
|
399
400
|
const testFunc = (aggFunc) => (result, sqlEquals) => {
|
400
401
|
it('should select from pilot.*, aggregated count(*) licence and ignore orderby', () => {
|
401
|
-
sqlEquals(
|
402
|
-
result
|
402
|
+
sqlEquals?.(
|
403
|
+
result,
|
403
404
|
`\
|
404
405
|
SELECT (
|
405
406
|
SELECT ${aggFunc('"pilot.licence".*')} AS "licence"
|
@@ -415,8 +416,8 @@ FROM "pilot"`,
|
|
415
416
|
};
|
416
417
|
const urlCount = '/pilot?$expand=licence/$count($orderby=id)';
|
417
418
|
test.postgres(urlCount, testFunc(postgresAgg));
|
418
|
-
test.mysql.
|
419
|
-
test.websql.
|
419
|
+
test.mysql.fail(urlCount, testFunc(mysqlAgg));
|
420
|
+
test.websql.fail(urlCount, testFunc(websqlAgg));
|
420
421
|
})();
|
421
422
|
|
422
423
|
(function () {
|
@@ -426,8 +427,8 @@ FROM "pilot"`,
|
|
426
427
|
).join(', ');
|
427
428
|
const testFunc = (aggFunc) => (result, sqlEquals) => {
|
428
429
|
it('should select from pilot.*, aggregated licence', () => {
|
429
|
-
sqlEquals(
|
430
|
-
result
|
430
|
+
sqlEquals?.(
|
431
|
+
result,
|
431
432
|
`\
|
432
433
|
SELECT (
|
433
434
|
SELECT ${aggFunc('"pilot.licence".*')} AS "licence"
|
@@ -444,8 +445,8 @@ FROM "pilot"`,
|
|
444
445
|
};
|
445
446
|
const url = '/pilot?$expand=licence($top=10)';
|
446
447
|
test.postgres(url, 'GET', [['Bind', 0]], testFunc(postgresAgg));
|
447
|
-
test.mysql.
|
448
|
-
test.websql.
|
448
|
+
test.mysql.fail(url, 'GET', [['Bind', 0]], testFunc(mysqlAgg));
|
449
|
+
test.websql.fail(url, 'GET', [['Bind', 0]], testFunc(websqlAgg));
|
449
450
|
})();
|
450
451
|
|
451
452
|
(function () {
|
@@ -455,8 +456,8 @@ FROM "pilot"`,
|
|
455
456
|
).join(', ');
|
456
457
|
const testFunc = (aggFunc) => (result, sqlEquals) => {
|
457
458
|
it('should select from pilot.*, aggregated count(*) licence and ignore top', () => {
|
458
|
-
sqlEquals(
|
459
|
-
result
|
459
|
+
sqlEquals?.(
|
460
|
+
result,
|
460
461
|
`\
|
461
462
|
SELECT (
|
462
463
|
SELECT ${aggFunc('"pilot.licence".*')} AS "licence"
|
@@ -472,8 +473,8 @@ FROM "pilot"`,
|
|
472
473
|
};
|
473
474
|
const urlCount = '/pilot?$expand=licence/$count($top=10)';
|
474
475
|
test.postgres(urlCount, testFunc(postgresAgg));
|
475
|
-
test.mysql.
|
476
|
-
test.websql.
|
476
|
+
test.mysql.fail(urlCount, testFunc(mysqlAgg));
|
477
|
+
test.websql.fail(urlCount, testFunc(websqlAgg));
|
477
478
|
})();
|
478
479
|
|
479
480
|
(function () {
|
@@ -483,8 +484,8 @@ FROM "pilot"`,
|
|
483
484
|
).join(', ');
|
484
485
|
const testFunc = (aggFunc) => (result, sqlEquals) => {
|
485
486
|
it('should select from pilot.*, aggregated licence', () => {
|
486
|
-
sqlEquals(
|
487
|
-
result
|
487
|
+
sqlEquals?.(
|
488
|
+
result,
|
488
489
|
`\
|
489
490
|
SELECT (
|
490
491
|
SELECT ${aggFunc('"pilot.licence".*')} AS "licence"
|
@@ -501,8 +502,8 @@ FROM "pilot"`,
|
|
501
502
|
};
|
502
503
|
const url = '/pilot?$expand=licence($skip=10)';
|
503
504
|
test.postgres(url, 'GET', [['Bind', 0]], testFunc(postgresAgg));
|
504
|
-
test.mysql.
|
505
|
-
test.websql.
|
505
|
+
test.mysql.fail(url, 'GET', [['Bind', 0]], testFunc(mysqlAgg));
|
506
|
+
test.websql.fail(url, 'GET', [['Bind', 0]], testFunc(websqlAgg));
|
506
507
|
})();
|
507
508
|
|
508
509
|
(function () {
|
@@ -512,8 +513,8 @@ FROM "pilot"`,
|
|
512
513
|
).join(', ');
|
513
514
|
const testFunc = (aggFunc) => (result, sqlEquals) => {
|
514
515
|
it('should select from pilot.*, aggregated count(*) licence and ignore skip', () => {
|
515
|
-
sqlEquals(
|
516
|
-
result
|
516
|
+
sqlEquals?.(
|
517
|
+
result,
|
517
518
|
`\
|
518
519
|
SELECT (
|
519
520
|
SELECT ${aggFunc('"pilot.licence".*')} AS "licence"
|
@@ -529,15 +530,15 @@ FROM "pilot"`,
|
|
529
530
|
};
|
530
531
|
const urlCount = '/pilot?$expand=licence/$count($skip=10)';
|
531
532
|
test.postgres(urlCount, testFunc(postgresAgg));
|
532
|
-
test.mysql.
|
533
|
-
test.websql.
|
533
|
+
test.mysql.fail(urlCount, testFunc(mysqlAgg));
|
534
|
+
test.websql.fail(urlCount, testFunc(websqlAgg));
|
534
535
|
})();
|
535
536
|
|
536
537
|
(function () {
|
537
538
|
const testFunc = (aggFunc) => (result, sqlEquals) => {
|
538
539
|
it('should select from pilot.*, aggregated(pilot-can fly-plane, aggregated plane)', () => {
|
539
|
-
sqlEquals(
|
540
|
-
result
|
540
|
+
sqlEquals?.(
|
541
|
+
result,
|
541
542
|
`\
|
542
543
|
SELECT (
|
543
544
|
SELECT ${aggFunc('"pilot.pilot-can fly-plane".*')} AS "can_fly__plane"
|
@@ -553,15 +554,15 @@ FROM "pilot"`,
|
|
553
554
|
};
|
554
555
|
const url = '/pilot?$expand=can_fly__plane($select=plane)';
|
555
556
|
test.postgres(url, testFunc(postgresAgg));
|
556
|
-
test.mysql.
|
557
|
-
test.websql.
|
557
|
+
test.mysql.fail(url, testFunc(mysqlAgg));
|
558
|
+
test.websql.fail(url, testFunc(websqlAgg));
|
558
559
|
})();
|
559
560
|
|
560
561
|
(function () {
|
561
562
|
const testFunc = (aggFunc) => (result, sqlEquals) => {
|
562
563
|
it('should select from pilot.*, aggregated count(*) pilot-can fly-plane and ignore select', () => {
|
563
|
-
sqlEquals(
|
564
|
-
result
|
564
|
+
sqlEquals?.(
|
565
|
+
result,
|
565
566
|
`\
|
566
567
|
SELECT (
|
567
568
|
SELECT ${aggFunc('"pilot.pilot-can fly-plane".*')} AS "can_fly__plane"
|
@@ -577,8 +578,8 @@ FROM "pilot"`,
|
|
577
578
|
};
|
578
579
|
const urlCount = '/pilot?$expand=can_fly__plane/$count($select=plane)';
|
579
580
|
test.postgres(urlCount, testFunc(postgresAgg));
|
580
|
-
test.mysql.
|
581
|
-
test.websql.
|
581
|
+
test.mysql.fail(urlCount, testFunc(mysqlAgg));
|
582
|
+
test.websql.fail(urlCount, testFunc(websqlAgg));
|
582
583
|
})();
|
583
584
|
|
584
585
|
(function () {
|
@@ -589,8 +590,8 @@ FROM "pilot"`,
|
|
589
590
|
).join(', ');
|
590
591
|
const testFunc = (aggFunc) => (result, sqlEquals) => {
|
591
592
|
it('should select from pilot.*, aggregated pilot', () => {
|
592
|
-
sqlEquals(
|
593
|
-
result
|
593
|
+
sqlEquals?.(
|
594
|
+
result,
|
594
595
|
`\
|
595
596
|
SELECT (
|
596
597
|
SELECT ${aggFunc('"pilot.trained-pilot".*')} AS "trained__pilot"
|
@@ -606,6 +607,6 @@ FROM "pilot"`,
|
|
606
607
|
};
|
607
608
|
const url = '/pilot?$expand=trained__pilot';
|
608
609
|
test.postgres(url, testFunc(postgresAgg));
|
609
|
-
test.mysql.
|
610
|
-
test.websql.
|
610
|
+
test.mysql.fail(url, testFunc(mysqlAgg));
|
611
|
+
test.websql.fail(url, testFunc(websqlAgg));
|
611
612
|
})();
|