You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/query-typeorm/__tests__/query/__snapshots__/filter-query.builder.spec.ts.snap
+28Lines changed: 28 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,34 @@ exports[`FilterQueryBuilder #delete with sorting should ignore sorting 1`] = `DE
12
12
13
13
exports[`FilterQueryBuilder #delete with sorting should ignore sorting 2`] =`Array []`;
14
14
15
+
exports[`FilterQueryBuilder #select with custom filter should add custom filters 1`] =`SELECT "TestEntity"."test_entity_pk" AS "TestEntity_test_entity_pk", "TestEntity"."string_type" AS "TestEntity_string_type", "TestEntity"."bool_type" AS "TestEntity_bool_type", "TestEntity"."number_type" AS "TestEntity_number_type", "TestEntity"."date_type" AS "TestEntity_date_type", "TestEntity"."oneTestRelationTestRelationPk" AS "TestEntity_oneTestRelationTestRelationPk" FROM "test_entity" "TestEntity" WHERE ("TestEntity"."number_type" >= ? OR "TestEntity"."number_type" <= ? OR ("TestEntity"."numberType" % ?) == 0) AND ((EXTRACT(EPOCH FROM "TestEntity"."dateType") / 3600 / 24) % ?) == 0) AND (ST_Distance("TestEntity"."fakePointType", ST_MakePoint(?,?)) <= ?)`;
16
+
17
+
exports[`FilterQueryBuilder #select with custom filter should add custom filters 2`] =`
18
+
Array [
19
+
1,
20
+
10,
21
+
5,
22
+
3,
23
+
45.3,
24
+
9.5,
25
+
50000,
26
+
]
27
+
`;
28
+
29
+
exports[`FilterQueryBuilder #select with custom filter should add custom filters with aggregate 1`] =`SELECT MAX("TestEntity"."number_type") AS "MAX_numberType" FROM "test_entity" "TestEntity" WHERE ("TestEntity"."number_type" >= ? OR "TestEntity"."number_type" <= ? OR ("TestEntity"."numberType" % ?) == 0) AND ((EXTRACT(EPOCH FROM "TestEntity"."dateType") / 3600 / 24) % ?) == 0) AND (ST_Distance("TestEntity"."fakePointType", ST_MakePoint(?,?)) <= ?)`;
30
+
31
+
exports[`FilterQueryBuilder #select with custom filter should add custom filters with aggregate 2`] =`
32
+
Array [
33
+
1,
34
+
10,
35
+
5,
36
+
3,
37
+
45.3,
38
+
9.5,
39
+
50000,
40
+
]
41
+
`;
42
+
15
43
exports[`FilterQueryBuilder #select with filter should call whereBuilder#build if there is a filter 1`] =`SELECT "TestEntity"."test_entity_pk" AS "TestEntity_test_entity_pk", "TestEntity"."string_type" AS "TestEntity_string_type", "TestEntity"."bool_type" AS "TestEntity_bool_type", "TestEntity"."number_type" AS "TestEntity_number_type", "TestEntity"."date_type" AS "TestEntity_date_type", "TestEntity"."oneTestRelationTestRelationPk" AS "TestEntity_oneTestRelationTestRelationPk" FROM "test_entity" "TestEntity" WHERE "TestEntity"."string_type" = 'foo'`;
16
44
17
45
exports[`FilterQueryBuilder #select with filter should call whereBuilder#build if there is a filter 2`] =`Array []`;
Copy file name to clipboardExpand all lines: packages/query-typeorm/__tests__/query/__snapshots__/relation-query.builder.spec.ts.snap
+7-1Lines changed: 7 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -72,12 +72,18 @@ Array [
72
72
]
73
73
`;
74
74
75
-
exports[`RelationQueryBuilder #select with custom filters should accept custom filters 1`] =`SELECT "testEntityRelation"."test_relation_id" AS "testEntityRelation_test_relation_id", "testEntityRelation"."test_entity_id" AS "testEntityRelation_test_entity_id" FROM "test_entity_relation_entity" "testEntityRelation" WHERE ("testEntityRelation"."test_entity_id" = ?) AND (("testEntityRelation"."numberType" % ?) == 0)`;
75
+
exports[`RelationQueryBuilder #select with custom filters should accept custom filters 1`] =`SELECT "testEntityRelation"."test_relation_id" AS "testEntityRelation_test_relation_id", "testEntityRelation"."test_entity_id" AS "testEntityRelation_test_entity_id" FROM "test_entity_relation_entity" "testEntityRelation" WHERE ("testEntityRelation"."test_entity_id" = ?) AND (testEntityRelation.numberType >= ? OR testEntityRelation.numberType <= ? OR ("testEntityRelation"."numberType" % ?) == 0) AND ((EXTRACT(EPOCH FROM "testEntityRelation"."dateType") / 3600 / 24) % ?) == 0) AND (ST_Distance("testEntityRelation"."fakePointType", ST_MakePoint(?,?)) <= ?)`;
76
76
77
77
exports[`RelationQueryBuilder #select with custom filters should accept custom filters 2`] =`
0 commit comments