@simplysm/orm-common 13.0.74 → 13.0.76

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.
Files changed (36) hide show
  1. package/package.json +2 -2
  2. package/tests/db-context/create-db-context.spec.ts +0 -31
  3. package/tests/db-context/define-db-context.spec.ts +0 -51
  4. package/tests/ddl/basic.spec.ts +0 -157
  5. package/tests/ddl/column-builder.spec.ts +0 -112
  6. package/tests/ddl/index-builder.spec.ts +0 -54
  7. package/tests/ddl/procedure-builder.spec.ts +0 -106
  8. package/tests/ddl/relation-builder.spec.ts +0 -201
  9. package/tests/ddl/table-builder.spec.ts +0 -34
  10. package/tests/ddl/view-builder.spec.ts +0 -60
  11. package/tests/dml/delete.spec.ts +0 -33
  12. package/tests/dml/insert.spec.ts +0 -78
  13. package/tests/dml/update.spec.ts +0 -96
  14. package/tests/dml/upsert.spec.ts +0 -52
  15. package/tests/errors/queryable-errors.spec.ts +0 -51
  16. package/tests/escape.spec.ts +0 -41
  17. package/tests/examples/pivot.spec.ts +0 -333
  18. package/tests/examples/sampling.spec.ts +0 -63
  19. package/tests/examples/unpivot.spec.ts +0 -65
  20. package/tests/exec/search-parser.spec.ts +0 -16
  21. package/tests/expr/comparison.spec.ts +0 -66
  22. package/tests/expr/conditional.spec.ts +0 -27
  23. package/tests/expr/date.spec.ts +0 -67
  24. package/tests/expr/math.spec.ts +0 -47
  25. package/tests/expr/string.spec.ts +0 -56
  26. package/tests/expr/utility.spec.ts +0 -27
  27. package/tests/select/basic.spec.ts +0 -69
  28. package/tests/select/filter.spec.ts +0 -114
  29. package/tests/select/group.spec.ts +0 -85
  30. package/tests/select/join.spec.ts +0 -113
  31. package/tests/select/order.spec.ts +0 -49
  32. package/tests/select/subquery.spec.ts +0 -96
  33. package/tests/select/window.spec.ts +0 -185
  34. package/tests/types/nullable-queryable-record.spec.ts +0 -48
  35. package/tests/utils/result-parser-perf.spec.ts +0 -67
  36. package/tests/utils/result-parser.spec.ts +0 -34
@@ -23,45 +23,14 @@ describe("MysqlExprRenderer.escapeString", () => {
23
23
 
24
24
  //#endregion
25
25
 
26
- //#region ========== Control Character Escaping ==========
27
-
28
- it("should escape newlines", () => {
29
- const result = renderer.escapeString("line1\nline2");
30
- expect(result).toBe("line1\\nline2");
31
- });
32
-
33
- it("should escape carriage returns", () => {
34
- const result = renderer.escapeString("line1\rline2");
35
- expect(result).toBe("line1\\rline2");
36
- });
37
-
38
- it("should escape tabs", () => {
39
- const result = renderer.escapeString("col1\tcol2");
40
- expect(result).toBe("col1\\tcol2");
41
- });
42
-
43
- //#endregion
44
-
45
26
  //#region ========== Combined Attack Test ==========
46
27
 
47
- it("should defend against SQL injection attempts", () => {
48
- const malicious = "'; DROP TABLE users; --";
49
- const result = renderer.escapeString(malicious);
50
- expect(result).toBe("''; DROP TABLE users; --");
51
- });
52
-
53
28
  it("should defend against backslash + quote combination", () => {
54
29
  const malicious = "\\'";
55
30
  const result = renderer.escapeString(malicious);
56
31
  expect(result).toBe("\\\\''");
57
32
  });
58
33
 
59
- it("should defend against NULL byte + SQL comment combination", () => {
60
- const malicious = "admin\0-- ";
61
- const result = renderer.escapeString(malicious);
62
- expect(result).toBe("admin\\0-- ");
63
- });
64
-
65
34
  //#endregion
66
35
  });
67
36
 
@@ -73,16 +42,6 @@ describe("MysqlExprRenderer.escapeValue", () => {
73
42
  expect(result).toBe("'O''Reilly'");
74
43
  });
75
44
 
76
- it("correctly escapes string containing backslashes", () => {
77
- const result = renderer.escapeValue("C:\\path");
78
- expect(result).toBe("'C:\\\\path'");
79
- });
80
-
81
- it("defends against SQL injection attempts", () => {
82
- const result = renderer.escapeValue("'; DROP TABLE users; --");
83
- expect(result).toBe("'''; DROP TABLE users; --'");
84
- });
85
-
86
45
  it("returns 'NULL' string for null", () => {
87
46
  const result = renderer.escapeValue(null);
88
47
  expect(result).toBe("NULL");
@@ -68,339 +68,6 @@ describe("SELECT - PIVOT (groupBy + switch)", () => {
68
68
  });
69
69
  });
70
70
 
71
- describe("COUNT", () => {
72
- const db = createTestDb();
73
- const def = db
74
- .sales()
75
- .groupBy((item) => [item.id, item.category])
76
- .select((item) => ({
77
- id: item.id,
78
- category: item.category,
79
- y2020: expr.count(expr.if(expr.eq(item.year, 2020), item.amount, undefined)),
80
- y2021: expr.count(expr.if(expr.eq(item.year, 2021), item.amount, undefined)),
81
- }))
82
- .getSelectQueryDef();
83
-
84
- it("Verify QueryDef", () => {
85
- expect(def).toEqual({
86
- type: "select",
87
- as: "T1",
88
- from: { database: "TestDb", schema: "TestSchema", name: "Sales" },
89
- groupBy: [
90
- { type: "column", path: ["T1", "id"] },
91
- { type: "column", path: ["T1", "category"] },
92
- ],
93
- select: {
94
- id: { type: "column", path: ["T1", "id"] },
95
- category: { type: "column", path: ["T1", "category"] },
96
- y2020: {
97
- type: "count",
98
- arg: {
99
- type: "if",
100
- condition: {
101
- type: "eq",
102
- source: { type: "column", path: ["T1", "year"] },
103
- target: { type: "value", value: 2020 },
104
- },
105
- then: { type: "column", path: ["T1", "amount"] },
106
- else: { type: "value", value: undefined },
107
- },
108
- },
109
- y2021: {
110
- type: "count",
111
- arg: {
112
- type: "if",
113
- condition: {
114
- type: "eq",
115
- source: { type: "column", path: ["T1", "year"] },
116
- target: { type: "value", value: 2021 },
117
- },
118
- then: { type: "column", path: ["T1", "amount"] },
119
- else: { type: "value", value: undefined },
120
- },
121
- },
122
- },
123
- });
124
- });
125
-
126
- it.each(dialects)("[%s] Verify SQL", (dialect) => {
127
- const builder = createQueryBuilder(dialect);
128
- expect(builder.build(def)).toMatchSql(expected.pivotCount[dialect]);
129
- });
130
- });
131
-
132
- describe("AVG", () => {
133
- const db = createTestDb();
134
- const def = db
135
- .sales()
136
- .groupBy((item) => [item.id, item.category])
137
- .select((item) => ({
138
- id: item.id,
139
- category: item.category,
140
- y2020: expr.avg(expr.if(expr.eq(item.year, 2020), item.amount, undefined)),
141
- y2021: expr.avg(expr.if(expr.eq(item.year, 2021), item.amount, undefined)),
142
- }))
143
- .getSelectQueryDef();
144
-
145
- it("Verify QueryDef", () => {
146
- expect(def).toEqual({
147
- type: "select",
148
- as: "T1",
149
- from: { database: "TestDb", schema: "TestSchema", name: "Sales" },
150
- groupBy: [
151
- { type: "column", path: ["T1", "id"] },
152
- { type: "column", path: ["T1", "category"] },
153
- ],
154
- select: {
155
- id: { type: "column", path: ["T1", "id"] },
156
- category: { type: "column", path: ["T1", "category"] },
157
- y2020: {
158
- type: "avg",
159
- arg: {
160
- type: "if",
161
- condition: {
162
- type: "eq",
163
- source: { type: "column", path: ["T1", "year"] },
164
- target: { type: "value", value: 2020 },
165
- },
166
- then: { type: "column", path: ["T1", "amount"] },
167
- else: { type: "value", value: undefined },
168
- },
169
- },
170
- y2021: {
171
- type: "avg",
172
- arg: {
173
- type: "if",
174
- condition: {
175
- type: "eq",
176
- source: { type: "column", path: ["T1", "year"] },
177
- target: { type: "value", value: 2021 },
178
- },
179
- then: { type: "column", path: ["T1", "amount"] },
180
- else: { type: "value", value: undefined },
181
- },
182
- },
183
- },
184
- });
185
- });
186
-
187
- it.each(dialects)("[%s] Verify SQL", (dialect) => {
188
- const builder = createQueryBuilder(dialect);
189
- expect(builder.build(def)).toMatchSql(expected.pivotAvg[dialect]);
190
- });
191
- });
192
-
193
- describe("MAX", () => {
194
- const db = createTestDb();
195
- const def = db
196
- .sales()
197
- .groupBy((item) => [item.id, item.category])
198
- .select((item) => ({
199
- id: item.id,
200
- category: item.category,
201
- y2020: expr.max(expr.if(expr.eq(item.year, 2020), item.amount, undefined)),
202
- y2021: expr.max(expr.if(expr.eq(item.year, 2021), item.amount, undefined)),
203
- }))
204
- .getSelectQueryDef();
205
-
206
- it("Verify QueryDef", () => {
207
- expect(def).toEqual({
208
- type: "select",
209
- as: "T1",
210
- from: { database: "TestDb", schema: "TestSchema", name: "Sales" },
211
- groupBy: [
212
- { type: "column", path: ["T1", "id"] },
213
- { type: "column", path: ["T1", "category"] },
214
- ],
215
- select: {
216
- id: { type: "column", path: ["T1", "id"] },
217
- category: { type: "column", path: ["T1", "category"] },
218
- y2020: {
219
- type: "max",
220
- arg: {
221
- type: "if",
222
- condition: {
223
- type: "eq",
224
- source: { type: "column", path: ["T1", "year"] },
225
- target: { type: "value", value: 2020 },
226
- },
227
- then: { type: "column", path: ["T1", "amount"] },
228
- else: { type: "value", value: undefined },
229
- },
230
- },
231
- y2021: {
232
- type: "max",
233
- arg: {
234
- type: "if",
235
- condition: {
236
- type: "eq",
237
- source: { type: "column", path: ["T1", "year"] },
238
- target: { type: "value", value: 2021 },
239
- },
240
- then: { type: "column", path: ["T1", "amount"] },
241
- else: { type: "value", value: undefined },
242
- },
243
- },
244
- },
245
- });
246
- });
247
-
248
- it.each(dialects)("[%s] Verify SQL", (dialect) => {
249
- const builder = createQueryBuilder(dialect);
250
- expect(builder.build(def)).toMatchSql(expected.pivotMax[dialect]);
251
- });
252
- });
253
-
254
- describe("MIN", () => {
255
- const db = createTestDb();
256
- const def = db
257
- .sales()
258
- .groupBy((item) => [item.id, item.category])
259
- .select((item) => ({
260
- id: item.id,
261
- category: item.category,
262
- y2020: expr.min(expr.if(expr.eq(item.year, 2020), item.amount, undefined)),
263
- y2021: expr.min(expr.if(expr.eq(item.year, 2021), item.amount, undefined)),
264
- }))
265
- .getSelectQueryDef();
266
-
267
- it("Verify QueryDef", () => {
268
- expect(def).toEqual({
269
- type: "select",
270
- as: "T1",
271
- from: { database: "TestDb", schema: "TestSchema", name: "Sales" },
272
- groupBy: [
273
- { type: "column", path: ["T1", "id"] },
274
- { type: "column", path: ["T1", "category"] },
275
- ],
276
- select: {
277
- id: { type: "column", path: ["T1", "id"] },
278
- category: { type: "column", path: ["T1", "category"] },
279
- y2020: {
280
- type: "min",
281
- arg: {
282
- type: "if",
283
- condition: {
284
- type: "eq",
285
- source: { type: "column", path: ["T1", "year"] },
286
- target: { type: "value", value: 2020 },
287
- },
288
- then: { type: "column", path: ["T1", "amount"] },
289
- else: { type: "value", value: undefined },
290
- },
291
- },
292
- y2021: {
293
- type: "min",
294
- arg: {
295
- type: "if",
296
- condition: {
297
- type: "eq",
298
- source: { type: "column", path: ["T1", "year"] },
299
- target: { type: "value", value: 2021 },
300
- },
301
- then: { type: "column", path: ["T1", "amount"] },
302
- else: { type: "value", value: undefined },
303
- },
304
- },
305
- },
306
- });
307
- });
308
-
309
- it.each(dialects)("[%s] Verify SQL", (dialect) => {
310
- const builder = createQueryBuilder(dialect);
311
- expect(builder.build(def)).toMatchSql(expected.pivotMin[dialect]);
312
- });
313
- });
314
-
315
- describe("3 or more pivot values", () => {
316
- const db = createTestDb();
317
- const def = db
318
- .sales()
319
- .groupBy((item) => [item.id, item.category])
320
- .select((item) => ({
321
- id: item.id,
322
- category: item.category,
323
- y2019: expr.sum(expr.if(expr.eq(item.year, 2019), item.amount, undefined)),
324
- y2020: expr.sum(expr.if(expr.eq(item.year, 2020), item.amount, undefined)),
325
- y2021: expr.sum(expr.if(expr.eq(item.year, 2021), item.amount, undefined)),
326
- y2022: expr.sum(expr.if(expr.eq(item.year, 2022), item.amount, undefined)),
327
- }))
328
- .getSelectQueryDef();
329
-
330
- it("Verify QueryDef", () => {
331
- expect(def).toEqual({
332
- type: "select",
333
- as: "T1",
334
- from: { database: "TestDb", schema: "TestSchema", name: "Sales" },
335
- groupBy: [
336
- { type: "column", path: ["T1", "id"] },
337
- { type: "column", path: ["T1", "category"] },
338
- ],
339
- select: {
340
- id: { type: "column", path: ["T1", "id"] },
341
- category: { type: "column", path: ["T1", "category"] },
342
- y2019: {
343
- type: "sum",
344
- arg: {
345
- type: "if",
346
- condition: {
347
- type: "eq",
348
- source: { type: "column", path: ["T1", "year"] },
349
- target: { type: "value", value: 2019 },
350
- },
351
- then: { type: "column", path: ["T1", "amount"] },
352
- else: { type: "value", value: undefined },
353
- },
354
- },
355
- y2020: {
356
- type: "sum",
357
- arg: {
358
- type: "if",
359
- condition: {
360
- type: "eq",
361
- source: { type: "column", path: ["T1", "year"] },
362
- target: { type: "value", value: 2020 },
363
- },
364
- then: { type: "column", path: ["T1", "amount"] },
365
- else: { type: "value", value: undefined },
366
- },
367
- },
368
- y2021: {
369
- type: "sum",
370
- arg: {
371
- type: "if",
372
- condition: {
373
- type: "eq",
374
- source: { type: "column", path: ["T1", "year"] },
375
- target: { type: "value", value: 2021 },
376
- },
377
- then: { type: "column", path: ["T1", "amount"] },
378
- else: { type: "value", value: undefined },
379
- },
380
- },
381
- y2022: {
382
- type: "sum",
383
- arg: {
384
- type: "if",
385
- condition: {
386
- type: "eq",
387
- source: { type: "column", path: ["T1", "year"] },
388
- target: { type: "value", value: 2022 },
389
- },
390
- then: { type: "column", path: ["T1", "amount"] },
391
- else: { type: "value", value: undefined },
392
- },
393
- },
394
- },
395
- });
396
- });
397
-
398
- it.each(dialects)("[%s] Verify SQL", (dialect) => {
399
- const builder = createQueryBuilder(dialect);
400
- expect(builder.build(def)).toMatchSql(expected.pivotMultipleYears[dialect]);
401
- });
402
- });
403
-
404
71
  describe("String pivot column", () => {
405
72
  const db = createTestDb();
406
73
  const def = db
@@ -39,67 +39,4 @@ describe("EXAMPLE - Random sampling", () => {
39
39
  });
40
40
  });
41
41
 
42
- describe("Conditional sampling (WHERE + ORDER BY RANDOM + TOP)", () => {
43
- const db = createTestDb();
44
- const def = db
45
- .user()
46
- .where((item) => [expr.gte(item.age, 20)])
47
- .orderBy(() => expr.random())
48
- .top(3)
49
- .getSelectQueryDef();
50
-
51
- it("Verify QueryDef", () => {
52
- expect(def).toEqual({
53
- type: "select",
54
- as: "T1",
55
- from: { database: "TestDb", schema: "TestSchema", name: "User" },
56
- where: [
57
- {
58
- type: "gte",
59
- source: { type: "column", path: ["T1", "age"] },
60
- target: { type: "value", value: 20 },
61
- },
62
- ],
63
- orderBy: [[{ type: "random" }]],
64
- top: 3,
65
- });
66
- });
67
-
68
- it.each(dialects)("[%s] Verify SQL", (dialect) => {
69
- const builder = createQueryBuilder(dialect);
70
- expect(builder.build(def)).toMatchSql(expected.samplingWithWhere[dialect]);
71
- });
72
- });
73
-
74
- describe("Column selection with sampling", () => {
75
- const db = createTestDb();
76
- const def = db
77
- .user()
78
- .select((item) => ({
79
- id: item.id,
80
- name: item.name,
81
- }))
82
- .orderBy(() => expr.random())
83
- .top(10)
84
- .getSelectQueryDef();
85
-
86
- it("Verify QueryDef", () => {
87
- expect(def).toEqual({
88
- type: "select",
89
- as: "T1",
90
- from: { database: "TestDb", schema: "TestSchema", name: "User" },
91
- select: {
92
- id: { type: "column", path: ["T1", "id"] },
93
- name: { type: "column", path: ["T1", "name"] },
94
- },
95
- orderBy: [[{ type: "random" }]],
96
- top: 10,
97
- });
98
- });
99
-
100
- it.each(dialects)("[%s] Verify SQL", (dialect) => {
101
- const builder = createQueryBuilder(dialect);
102
- expect(builder.build(def)).toMatchSql(expected.samplingWithSelect[dialect]);
103
- });
104
- });
105
42
  });
@@ -79,71 +79,6 @@ describe("SELECT - UNPIVOT (join + union)", () => {
79
79
  });
80
80
  });
81
81
 
82
- describe("2-column unpivot", () => {
83
- const db = createTestDb();
84
- const def = db
85
- .monthlySales()
86
- .join("unpvt", (qr, c) =>
87
- qr.union(
88
- qr.select({ period: expr.val("string", "jan"), value: c.jan }),
89
- qr.select({ period: expr.val("string", "feb"), value: c.feb }),
90
- ),
91
- )
92
- .select((item) => ({
93
- id: item.id,
94
- category: item.category,
95
- mar: item.mar,
96
- period: item.unpvt![0].period,
97
- value: item.unpvt![0].value,
98
- }))
99
- .getSelectQueryDef();
100
-
101
- it("Verify QueryDef", () => {
102
- expect(def).toEqual({
103
- type: "select",
104
- as: "T1",
105
- from: { database: "TestDb", schema: "TestSchema", name: "MonthlySales" },
106
- select: {
107
- id: { type: "column", path: ["T1", "id"] },
108
- category: { type: "column", path: ["T1", "category"] },
109
- mar: { type: "column", path: ["T1", "mar"] },
110
- period: { type: "column", path: ["T1.unpvt", "period"] },
111
- value: { type: "column", path: ["T1.unpvt", "value"] },
112
- },
113
- joins: [
114
- {
115
- type: "select",
116
- as: "T1.unpvt",
117
- from: [
118
- {
119
- type: "select",
120
- as: "T1.unpvt",
121
- select: {
122
- period: { type: "value", value: "jan" },
123
- value: { type: "column", path: ["T1", "jan"] },
124
- },
125
- },
126
- {
127
- type: "select",
128
- as: "T1.unpvt",
129
- select: {
130
- period: { type: "value", value: "feb" },
131
- value: { type: "column", path: ["T1", "feb"] },
132
- },
133
- },
134
- ],
135
- isSingle: false,
136
- },
137
- ],
138
- });
139
- });
140
-
141
- it.each(dialects)("[%s] Verify SQL", (dialect) => {
142
- const builder = createQueryBuilder(dialect);
143
- expect(builder.build(def)).toMatchSql(expected.unpivotTwoColumns[dialect]);
144
- });
145
- });
146
-
147
82
  describe("WHERE -> UNPIVOT", () => {
148
83
  const db = createTestDb();
149
84
  const def = db
@@ -56,14 +56,6 @@ describe("parseSearchQuery", () => {
56
56
  });
57
57
  });
58
58
 
59
- it("Multiple identical prefixes", () => {
60
- expect(parseSearchQuery("+사과 +바나나")).toEqual({
61
- or: [],
62
- must: ["%사과%", "%바나나%"],
63
- not: [],
64
- });
65
- });
66
-
67
59
  it("Ignore when only prefixes present", () => {
68
60
  expect(parseSearchQuery("+ - ")).toEqual({ or: [], must: [], not: [] });
69
61
  expect(parseSearchQuery("+ 사과")).toEqual({ or: ["%사과%"], must: [], not: [] });
@@ -148,14 +140,6 @@ describe("parseSearchQuery", () => {
148
140
  });
149
141
  });
150
142
 
151
- it("* on both sides → contains search (explicit)", () => {
152
- expect(parseSearchQuery("*사과*")).toEqual({
153
- or: ["%사과%"],
154
- must: [],
155
- not: [],
156
- });
157
- });
158
-
159
143
  it("* in middle → middle wildcard", () => {
160
144
  expect(parseSearchQuery("사*과")).toEqual({
161
145
  or: ["사%과"],
@@ -69,19 +69,6 @@ describe("Expr - Comparison operators (null-safe)", () => {
69
69
  .where((item) => [expr.gt(item.age, 20)])
70
70
  .getSelectQueryDef();
71
71
 
72
- it("Verify QueryDef", () => {
73
- expect(def).toMatchObject({
74
- type: "select",
75
- where: [
76
- {
77
- type: "gt",
78
- source: { type: "column", path: ["T1", "age"] },
79
- target: { type: "value", value: 20 },
80
- },
81
- ],
82
- });
83
- });
84
-
85
72
  it.each(dialects)("[%s] Verify SQL", (dialect) => {
86
73
  const builder = createQueryBuilder(dialect);
87
74
  expect(builder.build(def)).toMatchSql(expected.gt[dialect]);
@@ -95,19 +82,6 @@ describe("Expr - Comparison operators (null-safe)", () => {
95
82
  .where((item) => [expr.lt(item.age, 30)])
96
83
  .getSelectQueryDef();
97
84
 
98
- it("Verify QueryDef", () => {
99
- expect(def).toMatchObject({
100
- type: "select",
101
- where: [
102
- {
103
- type: "lt",
104
- source: { type: "column", path: ["T1", "age"] },
105
- target: { type: "value", value: 30 },
106
- },
107
- ],
108
- });
109
- });
110
-
111
85
  it.each(dialects)("[%s] Verify SQL", (dialect) => {
112
86
  const builder = createQueryBuilder(dialect);
113
87
  expect(builder.build(def)).toMatchSql(expected.lt[dialect]);
@@ -121,19 +95,6 @@ describe("Expr - Comparison operators (null-safe)", () => {
121
95
  .where((item) => [expr.gte(item.age, 18)])
122
96
  .getSelectQueryDef();
123
97
 
124
- it("Verify QueryDef", () => {
125
- expect(def).toMatchObject({
126
- type: "select",
127
- where: [
128
- {
129
- type: "gte",
130
- source: { type: "column", path: ["T1", "age"] },
131
- target: { type: "value", value: 18 },
132
- },
133
- ],
134
- });
135
- });
136
-
137
98
  it.each(dialects)("[%s] Verify SQL", (dialect) => {
138
99
  const builder = createQueryBuilder(dialect);
139
100
  expect(builder.build(def)).toMatchSql(expected.gte[dialect]);
@@ -147,19 +108,6 @@ describe("Expr - Comparison operators (null-safe)", () => {
147
108
  .where((item) => [expr.lte(item.age, 65)])
148
109
  .getSelectQueryDef();
149
110
 
150
- it("Verify QueryDef", () => {
151
- expect(def).toMatchObject({
152
- type: "select",
153
- where: [
154
- {
155
- type: "lte",
156
- source: { type: "column", path: ["T1", "age"] },
157
- target: { type: "value", value: 65 },
158
- },
159
- ],
160
- });
161
- });
162
-
163
111
  it.each(dialects)("[%s] Verify SQL", (dialect) => {
164
112
  const builder = createQueryBuilder(dialect);
165
113
  expect(builder.build(def)).toMatchSql(expected.lte[dialect]);
@@ -227,20 +175,6 @@ describe("Expr - Comparison operators (null-safe)", () => {
227
175
  .where((item) => [expr.between(item.age, undefined, 30)])
228
176
  .getSelectQueryDef();
229
177
 
230
- it("Verify QueryDef", () => {
231
- expect(def).toMatchObject({
232
- type: "select",
233
- where: [
234
- {
235
- type: "between",
236
- source: { type: "column", path: ["T1", "age"] },
237
- from: undefined,
238
- to: { type: "value", value: 30 },
239
- },
240
- ],
241
- });
242
- });
243
-
244
178
  it.each(dialects)("[%s] Verify SQL", (dialect) => {
245
179
  const builder = createQueryBuilder(dialect);
246
180
  expect(builder.build(def)).toMatchSql(expected.betweenToOnly[dialect]);