@balena/abstract-sql-compiler 10.2.4-build-renovate-major-22-node-81f07071cc94780a7385f50254cba5e9d8340e64-1 → 10.2.4-build-tests-ts-beb2503119ff2e479e1da25051d33a021129a9d7-1

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.
@@ -1,16 +1,23 @@
1
1
  - commits:
2
- - subject: Update dependency @types/node to v22
3
- hash: 81f07071cc94780a7385f50254cba5e9d8340e64
4
- body: |
5
- Update @types/node from 20.17.24 to 22.13.10
2
+ - subject: "Tests: convert test/odata/test to typescript"
3
+ hash: beb2503119ff2e479e1da25051d33a021129a9d7
4
+ body: ""
5
+ footer:
6
+ Change-type: patch
7
+ change-type: patch
8
+ author: Pagan Gazzard
9
+ nested: []
10
+ - subject: Update dev dependencies
11
+ hash: 703263fa73aff2253d1a931a5946a027d20c9ff6
12
+ body: ""
6
13
  footer:
7
14
  Change-type: patch
8
15
  change-type: patch
9
- author: balena-renovate[bot]
16
+ author: Pagan Gazzard
10
17
  nested: []
11
18
  version: 10.2.4
12
19
  title: ""
13
- date: 2025-03-19T14:47:14.021Z
20
+ date: 2025-04-04T13:16:10.504Z
14
21
  - commits:
15
22
  - subject: "Tests: convert test/abstract-sql/case-when-else.js to typescript"
16
23
  hash: 0edb21cc4ee30ead2a6eeb290623f3a0adc7a0fe
package/CHANGELOG.md CHANGED
@@ -4,9 +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.4 - 2025-03-19
7
+ ## 10.2.4 - 2025-04-04
8
8
 
9
- * Update dependency @types/node to v22 [balena-renovate[bot]]
9
+ * Tests: convert test/odata/test to typescript [Pagan Gazzard]
10
+ * Update dev dependencies [Pagan Gazzard]
10
11
 
11
12
  ## 10.2.3 - 2025-03-19
12
13
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@balena/abstract-sql-compiler",
3
- "version": "10.2.4-build-renovate-major-22-node-81f07071cc94780a7385f50254cba5e9d8340e64-1",
3
+ "version": "10.2.4-build-tests-ts-beb2503119ff2e479e1da25051d33a021129a9d7-1",
4
4
  "description": "A translator for abstract sql into sql.",
5
5
  "type": "commonjs",
6
6
  "main": "out/AbstractSQLCompiler.js",
@@ -23,23 +23,23 @@
23
23
  "@balena/sbvr-types": "^7.1.0 || ^8.0.0 || ^9.0.2"
24
24
  },
25
25
  "devDependencies": {
26
- "@balena/lf-to-abstract-sql": "^5.0.2",
26
+ "@balena/lf-to-abstract-sql": "^5.0.4",
27
27
  "@balena/lint": "^8.2.8",
28
- "@balena/odata-parser": "^3.1.0",
29
- "@balena/odata-to-abstract-sql": "^7.0.0",
30
- "@balena/sbvr-parser": "^1.4.6",
31
- "@types/chai": "^4.3.4",
28
+ "@balena/odata-parser": "^3.1.2",
29
+ "@balena/odata-to-abstract-sql": "^7.2.0",
30
+ "@balena/sbvr-parser": "^1.4.9",
31
+ "@types/chai": "^4.3.20",
32
32
  "@types/common-tags": "^1.8.4",
33
- "@types/lodash": "^4.17.10",
34
- "@types/mocha": "^10.0.8",
35
- "@types/node": "^22.0.0",
36
- "chai": "^4.3.7",
33
+ "@types/lodash": "^4.17.16",
34
+ "@types/mocha": "^10.0.10",
35
+ "@types/node": "^20.17.30",
36
+ "chai": "^4.5.0",
37
37
  "common-tags": "^1.8.2",
38
- "husky": "^9.1.6",
39
- "lint-staged": "^15.2.10",
40
- "mocha": "^11.0.0",
38
+ "husky": "^9.1.7",
39
+ "lint-staged": "^15.5.0",
40
+ "mocha": "^11.2.0",
41
41
  "ts-node": "^10.9.2",
42
- "typescript": "^5.6.2"
42
+ "typescript": "^5.8.2"
43
43
  },
44
44
  "lint-staged": {
45
45
  "*.js": [
@@ -64,6 +64,6 @@
64
64
  "npm": ">=10.7.0"
65
65
  },
66
66
  "versionist": {
67
- "publishedAt": "2025-03-19T14:47:14.379Z"
67
+ "publishedAt": "2025-04-04T13:16:10.931Z"
68
68
  }
69
69
  }
@@ -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.query,
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.skip(url, testFunc(mysqlAgg, aliasLicenceFields.join(', ')));
41
- test.mysql.skip(urlCount, testFunc(mysqlAgg, 'COUNT(*) AS "$count"'));
42
- test.websql.skip(url, testFunc(websqlAgg, aliasLicenceFields.join(', ')));
43
- test.websql.skip(urlCount, testFunc(websqlAgg, 'COUNT(*) AS "$count"'));
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.query,
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.skip(url, testFunc(mysqlAgg));
82
- test.websql.skip(url, testFunc(websqlAgg));
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.query,
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.skip(url, testFunc(mysqlAgg));
133
- test.websql.skip(url, testFunc(websqlAgg));
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.query,
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.skip(url, testFunc(mysqlAgg));
158
- test.websql.skip(url, testFunc(websqlAgg));
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.query,
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.skip(url, testFunc(mysqlAgg));
197
- test.websql.skip(url, testFunc(websqlAgg));
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.query,
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.skip(url, testFunc(mysqlAgg));
244
- test.websql.skip(url, testFunc(websqlAgg));
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.query,
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.skip(url, testFunc(mysqlAgg));
269
- test.websql.skip(url, testFunc(websqlAgg));
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.query,
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.skip(
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.skip(
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.skip(
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.skip(
328
+ test.websql.fail(
328
329
  urlCount,
329
330
  'GET',
330
331
  [['Bind', 0]],
@@ -339,17 +340,16 @@ 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.query,
343
+ sqlEquals?.(
344
+ result,
344
345
  `\
345
346
  SELECT (
346
347
  SELECT ${aggFunc('"pilot.licence".*')} AS "licence"
347
348
  FROM (
348
349
  SELECT ${aliasLicenceFields.join(', ')}
349
- FROM "licence" AS "pilot.licence",
350
- "pilot" AS "pilot.licence.is of-pilot"
351
- WHERE "pilot.licence"."id" = "pilot.licence.is of-pilot"."licence"
352
- AND ("pilot.licence.is of-pilot"."id") IS NOT NULL AND ("pilot.licence.is of-pilot"."id") = (?)
350
+ FROM "licence" AS "pilot.licence"
351
+ LEFT JOIN "pilot" AS "pilot.licence.is of-pilot" ON "pilot.licence"."id" = "pilot.licence.is of-pilot"."licence"
352
+ WHERE ("pilot.licence.is of-pilot"."id") IS NOT NULL AND ("pilot.licence.is of-pilot"."id") = (?)
353
353
  AND "pilot"."licence" = "pilot.licence"."id"
354
354
  ) AS "pilot.licence"
355
355
  ) AS "licence", ${remainingPilotFields}
@@ -359,8 +359,8 @@ FROM "pilot"`,
359
359
  };
360
360
  const url = '/pilot?$expand=licence($filter=is_of__pilot/id eq 1)';
361
361
  test.postgres(url, 'GET', [['Bind', 0]], testFunc(postgresAgg));
362
- test.mysql.skip(url, 'GET', [['Bind', 0]], testFunc(mysqlAgg));
363
- test.websql.skip(url, 'GET', [['Bind', 0]], testFunc(websqlAgg));
362
+ test.mysql.fail(url, 'GET', [['Bind', 0]], testFunc(mysqlAgg));
363
+ test.websql.fail(url, 'GET', [['Bind', 0]], testFunc(websqlAgg));
364
364
  })();
365
365
 
366
366
  (function () {
@@ -370,8 +370,8 @@ FROM "pilot"`,
370
370
  ).join(', ');
371
371
  const testFunc = (aggFunc) => (result, sqlEquals) => {
372
372
  it('should select from pilot.*, aggregated licence', () => {
373
- sqlEquals(
374
- result.query,
373
+ sqlEquals?.(
374
+ result,
375
375
  `\
376
376
  SELECT (
377
377
  SELECT ${aggFunc('"pilot.licence".*')} AS "licence"
@@ -388,8 +388,8 @@ FROM "pilot"`,
388
388
  };
389
389
  const url = '/pilot?$expand=licence($orderby=id)';
390
390
  test.postgres(url, testFunc(postgresAgg));
391
- test.mysql.skip(url, testFunc(mysqlAgg));
392
- test.websql.skip(url, testFunc(websqlAgg));
391
+ test.mysql.fail(url, testFunc(mysqlAgg));
392
+ test.websql.fail(url, testFunc(websqlAgg));
393
393
  })();
394
394
 
395
395
  (function () {
@@ -399,8 +399,8 @@ FROM "pilot"`,
399
399
  ).join(', ');
400
400
  const testFunc = (aggFunc) => (result, sqlEquals) => {
401
401
  it('should select from pilot.*, aggregated count(*) licence and ignore orderby', () => {
402
- sqlEquals(
403
- result.query,
402
+ sqlEquals?.(
403
+ result,
404
404
  `\
405
405
  SELECT (
406
406
  SELECT ${aggFunc('"pilot.licence".*')} AS "licence"
@@ -416,8 +416,8 @@ FROM "pilot"`,
416
416
  };
417
417
  const urlCount = '/pilot?$expand=licence/$count($orderby=id)';
418
418
  test.postgres(urlCount, testFunc(postgresAgg));
419
- test.mysql.skip(urlCount, testFunc(mysqlAgg));
420
- test.websql.skip(urlCount, testFunc(websqlAgg));
419
+ test.mysql.fail(urlCount, testFunc(mysqlAgg));
420
+ test.websql.fail(urlCount, testFunc(websqlAgg));
421
421
  })();
422
422
 
423
423
  (function () {
@@ -427,8 +427,8 @@ FROM "pilot"`,
427
427
  ).join(', ');
428
428
  const testFunc = (aggFunc) => (result, sqlEquals) => {
429
429
  it('should select from pilot.*, aggregated licence', () => {
430
- sqlEquals(
431
- result.query,
430
+ sqlEquals?.(
431
+ result,
432
432
  `\
433
433
  SELECT (
434
434
  SELECT ${aggFunc('"pilot.licence".*')} AS "licence"
@@ -445,8 +445,8 @@ FROM "pilot"`,
445
445
  };
446
446
  const url = '/pilot?$expand=licence($top=10)';
447
447
  test.postgres(url, 'GET', [['Bind', 0]], testFunc(postgresAgg));
448
- test.mysql.skip(url, 'GET', [['Bind', 0]], testFunc(mysqlAgg));
449
- test.websql.skip(url, 'GET', [['Bind', 0]], testFunc(websqlAgg));
448
+ test.mysql.fail(url, 'GET', [['Bind', 0]], testFunc(mysqlAgg));
449
+ test.websql.fail(url, 'GET', [['Bind', 0]], testFunc(websqlAgg));
450
450
  })();
451
451
 
452
452
  (function () {
@@ -456,8 +456,8 @@ FROM "pilot"`,
456
456
  ).join(', ');
457
457
  const testFunc = (aggFunc) => (result, sqlEquals) => {
458
458
  it('should select from pilot.*, aggregated count(*) licence and ignore top', () => {
459
- sqlEquals(
460
- result.query,
459
+ sqlEquals?.(
460
+ result,
461
461
  `\
462
462
  SELECT (
463
463
  SELECT ${aggFunc('"pilot.licence".*')} AS "licence"
@@ -473,8 +473,8 @@ FROM "pilot"`,
473
473
  };
474
474
  const urlCount = '/pilot?$expand=licence/$count($top=10)';
475
475
  test.postgres(urlCount, testFunc(postgresAgg));
476
- test.mysql.skip(urlCount, testFunc(mysqlAgg));
477
- test.websql.skip(urlCount, testFunc(websqlAgg));
476
+ test.mysql.fail(urlCount, testFunc(mysqlAgg));
477
+ test.websql.fail(urlCount, testFunc(websqlAgg));
478
478
  })();
479
479
 
480
480
  (function () {
@@ -484,8 +484,8 @@ FROM "pilot"`,
484
484
  ).join(', ');
485
485
  const testFunc = (aggFunc) => (result, sqlEquals) => {
486
486
  it('should select from pilot.*, aggregated licence', () => {
487
- sqlEquals(
488
- result.query,
487
+ sqlEquals?.(
488
+ result,
489
489
  `\
490
490
  SELECT (
491
491
  SELECT ${aggFunc('"pilot.licence".*')} AS "licence"
@@ -502,8 +502,8 @@ FROM "pilot"`,
502
502
  };
503
503
  const url = '/pilot?$expand=licence($skip=10)';
504
504
  test.postgres(url, 'GET', [['Bind', 0]], testFunc(postgresAgg));
505
- test.mysql.skip(url, 'GET', [['Bind', 0]], testFunc(mysqlAgg));
506
- test.websql.skip(url, 'GET', [['Bind', 0]], testFunc(websqlAgg));
505
+ test.mysql.fail(url, 'GET', [['Bind', 0]], testFunc(mysqlAgg));
506
+ test.websql.fail(url, 'GET', [['Bind', 0]], testFunc(websqlAgg));
507
507
  })();
508
508
 
509
509
  (function () {
@@ -513,8 +513,8 @@ FROM "pilot"`,
513
513
  ).join(', ');
514
514
  const testFunc = (aggFunc) => (result, sqlEquals) => {
515
515
  it('should select from pilot.*, aggregated count(*) licence and ignore skip', () => {
516
- sqlEquals(
517
- result.query,
516
+ sqlEquals?.(
517
+ result,
518
518
  `\
519
519
  SELECT (
520
520
  SELECT ${aggFunc('"pilot.licence".*')} AS "licence"
@@ -530,15 +530,15 @@ FROM "pilot"`,
530
530
  };
531
531
  const urlCount = '/pilot?$expand=licence/$count($skip=10)';
532
532
  test.postgres(urlCount, testFunc(postgresAgg));
533
- test.mysql.skip(urlCount, testFunc(mysqlAgg));
534
- test.websql.skip(urlCount, testFunc(websqlAgg));
533
+ test.mysql.fail(urlCount, testFunc(mysqlAgg));
534
+ test.websql.fail(urlCount, testFunc(websqlAgg));
535
535
  })();
536
536
 
537
537
  (function () {
538
538
  const testFunc = (aggFunc) => (result, sqlEquals) => {
539
539
  it('should select from pilot.*, aggregated(pilot-can fly-plane, aggregated plane)', () => {
540
- sqlEquals(
541
- result.query,
540
+ sqlEquals?.(
541
+ result,
542
542
  `\
543
543
  SELECT (
544
544
  SELECT ${aggFunc('"pilot.pilot-can fly-plane".*')} AS "can_fly__plane"
@@ -554,15 +554,15 @@ FROM "pilot"`,
554
554
  };
555
555
  const url = '/pilot?$expand=can_fly__plane($select=plane)';
556
556
  test.postgres(url, testFunc(postgresAgg));
557
- test.mysql.skip(url, testFunc(mysqlAgg));
558
- test.websql.skip(url, testFunc(websqlAgg));
557
+ test.mysql.fail(url, testFunc(mysqlAgg));
558
+ test.websql.fail(url, testFunc(websqlAgg));
559
559
  })();
560
560
 
561
561
  (function () {
562
562
  const testFunc = (aggFunc) => (result, sqlEquals) => {
563
563
  it('should select from pilot.*, aggregated count(*) pilot-can fly-plane and ignore select', () => {
564
- sqlEquals(
565
- result.query,
564
+ sqlEquals?.(
565
+ result,
566
566
  `\
567
567
  SELECT (
568
568
  SELECT ${aggFunc('"pilot.pilot-can fly-plane".*')} AS "can_fly__plane"
@@ -578,8 +578,8 @@ FROM "pilot"`,
578
578
  };
579
579
  const urlCount = '/pilot?$expand=can_fly__plane/$count($select=plane)';
580
580
  test.postgres(urlCount, testFunc(postgresAgg));
581
- test.mysql.skip(urlCount, testFunc(mysqlAgg));
582
- test.websql.skip(urlCount, testFunc(websqlAgg));
581
+ test.mysql.fail(urlCount, testFunc(mysqlAgg));
582
+ test.websql.fail(urlCount, testFunc(websqlAgg));
583
583
  })();
584
584
 
585
585
  (function () {
@@ -590,8 +590,8 @@ FROM "pilot"`,
590
590
  ).join(', ');
591
591
  const testFunc = (aggFunc) => (result, sqlEquals) => {
592
592
  it('should select from pilot.*, aggregated pilot', () => {
593
- sqlEquals(
594
- result.query,
593
+ sqlEquals?.(
594
+ result,
595
595
  `\
596
596
  SELECT (
597
597
  SELECT ${aggFunc('"pilot.trained-pilot".*')} AS "trained__pilot"
@@ -607,6 +607,6 @@ FROM "pilot"`,
607
607
  };
608
608
  const url = '/pilot?$expand=trained__pilot';
609
609
  test.postgres(url, testFunc(postgresAgg));
610
- test.mysql.skip(url, testFunc(mysqlAgg));
611
- test.websql.skip(url, testFunc(websqlAgg));
610
+ test.mysql.fail(url, testFunc(mysqlAgg));
611
+ test.websql.fail(url, testFunc(websqlAgg));
612
612
  })();