@@ -22,34 +22,22 @@ class Query {
22
22
static search(String attribute, String value) =>
23
23
_addQuery(attribute, 'search', value);
24
24
25
- static String _addQuery(String attribute, String method, dynamic value) => (value
26
- is List)
27
- ? '$method("$attribute", [${value.map((item) => parseValues(item)).join(",")}])'
28
- : '$method("$attribute", [${parseValues(value)}])';
25
+ static String orderAsc(String attribute) => 'orderAsc("$attribute")';
29
26
30
- static String orderAsc(String attribute) {
31
- return 'orderAsc("$attribute")';
32
- }
27
+ static String orderDesc(String attribute) => 'orderDesc("$attribute")';
33
28
34
- static String orderDesc(String attribute) {
35
- return 'orderDesc("$attribute")';
36
- }
29
+ static String cursorBefore(String id) => 'cursorBefore("$id")';
37
30
38
- static String cursorBefore(String id) {
39
- return 'cursorBefore("$id")';
40
- }
31
+ static String cursorAfter(String id) => 'cursorAfter("$id")';
41
32
42
- static String cursorAfter(String id) {
43
- return 'cursorAfter("$id")';
44
- }
33
+ static String limit(int limit) => 'limit($limit)';
45
34
46
- static String limit(int limit) {
47
- return 'limit($limit)';
48
- }
35
+ static String offset(int offset) => 'offset($offset)';
49
36
50
- static String offset(int offset) {
51
- return 'offset($offset)';
52
- }
37
+ static String _addQuery(String attribute, String method, dynamic value) => (value
38
+ is List)
39
+ ? '$method("$attribute", [${value.map((item) => parseValues(item)).join(",")}])'
40
+ : '$method("$attribute", [${parseValues(value)}])';
53
41
54
42
static String parseValues(dynamic value) =>
55
43
(value is String) ? '"$value"' : '$value';
0 commit comments