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
* query: "SELECT tes.* FROM TestClazz AS tes WHERE tes.description LIKE ? AND tes.id > ?"
42
+
* }
43
+
*/
44
+
45
+
const queryProjections =newQuery(TestClazz);
46
+
queryProjections.projection(projection=> {
47
+
projection.add(x=>x.description);
48
+
projection.sum(x=>x.id);
49
+
projection.max(x=>x.referenceTest.id);
50
+
projection.count(x=>x.id, "countId");
51
+
});
52
+
print(queryProjections.compile());
53
+
/**
54
+
* {
55
+
* params: [],
56
+
* query: "SELECT tes.description AS description, SUM(tes.id) AS id, MAX(tes.referenceTest_id) AS referenceTest_id, COUNT(tes.id) AS countId FROM TestClazz AS tes"
57
+
* }
58
+
*/
59
+
60
+
const queryOrderBy =newQuery(TestClazz);
61
+
queryOrderBy.orderBy(x=>x.id);
62
+
print(queryOrderBy.compile());
63
+
/**
64
+
* {
65
+
* params: [],
66
+
* query: "SELECT tes.* FROM TestClazz AS tes ORDER BY tes.id ASC"
0 commit comments