@@ -33,89 +33,89 @@ class Query {
33
33
/// [value] can be a single value or a list. If a list is used
34
34
/// the query will return resources where [attribute] is equal
35
35
/// to any of the values in the list.
36
- static Query equal(String attribute, dynamic value) =>
37
- Query._('equal', attribute, value);
36
+ static string equal(String attribute, dynamic value) =>
37
+ Query._('equal', attribute, value).toJson() ;
38
38
39
39
/// Filter resources where [attribute] is not equal to [value].
40
- static Query notEqual(String attribute, dynamic value) =>
41
- Query._('notEqual', attribute, [value]);
40
+ static string notEqual(String attribute, dynamic value) =>
41
+ Query._('notEqual', attribute, [value]).toJson() ;
42
42
43
43
/// Filter resources where [attribute] is less than [value].
44
- static Query lessThan(String attribute, dynamic value) =>
45
- Query._('lessThan', attribute, value);
44
+ static string lessThan(String attribute, dynamic value) =>
45
+ Query._('lessThan', attribute, value).toJson() ;
46
46
47
47
/// Filter resources where [attribute] is less than or equal to [value].
48
- static Query lessThanEqual(String attribute, dynamic value) =>
49
- Query._('lessThanEqual', attribute, value);
48
+ static string lessThanEqual(String attribute, dynamic value) =>
49
+ Query._('lessThanEqual', attribute, value).toJson() ;
50
50
51
51
/// Filter resources where [attribute] is greater than [value].
52
- static Query greaterThan(String attribute, dynamic value) =>
53
- Query._('greaterThan', attribute, value);
52
+ static string greaterThan(String attribute, dynamic value) =>
53
+ Query._('greaterThan', attribute, value).toJson() ;
54
54
55
55
/// Filter resources where [attribute] is greater than or equal to [value].
56
- static Query greaterThanEqual(String attribute, dynamic value) =>
57
- Query._('greaterThanEqual', attribute, value);
56
+ static string greaterThanEqual(String attribute, dynamic value) =>
57
+ Query._('greaterThanEqual', attribute, value).toJson() ;
58
58
59
59
/// Filter resources where by searching [attribute] for [value].
60
- static Query search(String attribute, String value) =>
61
- Query._('search', attribute, value);
60
+ static string search(String attribute, String value) =>
61
+ Query._('search', attribute, value).toJson() ;
62
62
63
63
/// Filter resources where [attribute] is null.
64
- static Query isNull(String attribute) => Query._('isNull', attribute);
64
+ static string isNull(String attribute) => Query._('isNull', attribute).toJson( );
65
65
66
66
/// Filter resources where [attribute] is not null.
67
- static Query isNotNull(String attribute) => Query._('isNotNull', attribute);
67
+ static string isNotNull(String attribute) => Query._('isNotNull', attribute).toJson( );
68
68
69
69
/// Filter resources where [attribute] is between [start] and [end] (inclusive).
70
- static Query between(String attribute, dynamic start, dynamic end) =>
71
- Query._('between', attribute, [start, end]);
70
+ static string between(String attribute, dynamic start, dynamic end) =>
71
+ Query._('between', attribute, [start, end]).toJson() ;
72
72
73
73
/// Filter resources where [attribute] starts with [value].
74
- static Query startsWith(String attribute, String value) =>
75
- Query._('startsWith', attribute, value);
74
+ static string startsWith(String attribute, String value) =>
75
+ Query._('startsWith', attribute, value).toJson() ;
76
76
77
77
/// Filter resources where [attribute] ends with [value].
78
- static Query endsWith(String attribute, String value) =>
79
- Query._('endsWith', attribute, value);
78
+ static string endsWith(String attribute, String value) =>
79
+ Query._('endsWith', attribute, value).toJson() ;
80
80
81
81
/// Filter resouorces where [attribute] contains [value]
82
82
/// [value] can be a single value or a list.
83
- static Query contains(String attribute, dynamic value) =>
84
- Query._('contains', attribute, value);
83
+ static string contains(String attribute, dynamic value) =>
84
+ Query._('contains', attribute, value).toJson() ;
85
85
86
- static Query or(List<Query > queries) => Query._('or', null, queries);
86
+ static string or(List<Query > queries) => Query._('or', null, queries).toJson( );
87
87
88
- static Query and(List<Query > queries) => Query._('and', null, queries);
88
+ static string and(List<Query > queries) => Query._('and', null, queries).toJson( );
89
89
90
90
/// Specify which attributes should be returned by the API call.
91
- static Query select(List<String > attributes) =>
92
- Query._('select', null, attributes);
91
+ static string select(List<String > attributes) =>
92
+ Query._('select', null, attributes).toJson() ;
93
93
94
94
/// Sort results by [attribute] ascending.
95
- static Query orderAsc(String attribute) => Query._('orderAsc', attribute);
95
+ static string orderAsc(String attribute) => Query._('orderAsc', attribute).toJson( );
96
96
97
97
/// Sort results by [attribute] descending.
98
- static Query orderDesc(String attribute) => Query._('orderDesc', attribute);
98
+ static string orderDesc(String attribute) => Query._('orderDesc', attribute).toJson( );
99
99
100
100
/// Return results before [id].
101
101
///
102
102
/// Refer to the [Cursor Based Pagination]({{sdk .url }}/docs/pagination#cursor-pagination)
103
103
/// docs for more information.
104
- static Query cursorBefore(String id) => Query._('cursorBefore', null, id);
104
+ static string cursorBefore(String id) => Query._('cursorBefore', null, id).toJson( );
105
105
106
106
/// Return results after [id].
107
107
///
108
108
/// Refer to the [Cursor Based Pagination]({{sdk .url }}/docs/pagination#cursor-pagination)
109
109
/// docs for more information.
110
- static Query cursorAfter(String id) => Query._('cursorAfter', null, id);
110
+ static string cursorAfter(String id) => Query._('cursorAfter', null, id).toJson( );
111
111
112
112
/// Return only [limit] results.
113
- static Query limit(int limit) => Query._('limit', null, limit);
113
+ static string limit(int limit) => Query._('limit', null, limit).toJson( );
114
114
115
115
/// Return results from [offset].
116
116
///
117
117
/// Refer to the [Offset Pagination]({{sdk .url }}/docs/pagination#offset-pagination)
118
118
/// docs for more information.
119
- static Query offset(int offset) => Query._('offset', null, offset);
119
+ static string offset(int offset) => Query._('offset', null, offset).toJson( );
120
120
121
121
}
0 commit comments