@@ -11,11 +11,11 @@ class Query {
1111 Map <String , dynamic > toJson () {
1212 final map = < String , dynamic > {'method' : method};
1313
14- if (attribute != null ) {
14+ if (attribute != null ) {
1515 map['attribute' ] = attribute;
1616 }
17-
18- if (values != null ) {
17+
18+ if (values != null ) {
1919 map['values' ] = values is List ? values : [values];
2020 }
2121
@@ -26,7 +26,7 @@ class Query {
2626 String toString () => jsonEncode (toJson ());
2727
2828 /// Filter resources where [attribute] is equal to [value] .
29- ///
29+ ///
3030 /// [value] can be a single value or a list. If a list is used
3131 /// the query will return resources where [attribute] is equal
3232 /// to any of the values in the list.
@@ -111,6 +111,10 @@ class Query {
111111 static String createdAfter (String value) =>
112112 Query ._('createdAfter' , null , value).toString ();
113113
114+ /// Filter resources where document was created between [start] and [end] (inclusive).
115+ static String createdBetween (String start, String end) =>
116+ Query ._('createdBetween' , null , [start, end]).toString ();
117+
114118 /// Filter resources where document was updated before [value] .
115119 static String updatedBefore (String value) =>
116120 Query ._('updatedBefore' , null , value).toString ();
@@ -119,6 +123,10 @@ class Query {
119123 static String updatedAfter (String value) =>
120124 Query ._('updatedAfter' , null , value).toString ();
121125
126+ /// Filter resources where document was updated between [start] and [end] (inclusive).
127+ static String updatedBetween (String start, String end) =>
128+ Query ._('updatedBetween' , null , [start, end]).toString ();
129+
122130 static String or (List <String > queries) => Query ._(
123131 'or' ,
124132 null ,
@@ -144,14 +152,14 @@ class Query {
144152 Query ._('orderDesc' , attribute).toString ();
145153
146154 /// Return results before [id] .
147- ///
155+ ///
148156 /// Refer to the [Cursor Based Pagination] (https://appwrite.io/docs/pagination#cursor-pagination)
149157 /// docs for more information.
150158 static String cursorBefore (String id) =>
151159 Query ._('cursorBefore' , null , id).toString ();
152160
153161 /// Return results after [id] .
154- ///
162+ ///
155163 /// Refer to the [Cursor Based Pagination] (https://appwrite.io/docs/pagination#cursor-pagination)
156164 /// docs for more information.
157165 static String cursorAfter (String id) =>
@@ -161,9 +169,9 @@ class Query {
161169 static String limit (int limit) => Query ._('limit' , null , limit).toString ();
162170
163171 /// Return results from [offset] .
164- ///
172+ ///
165173 /// Refer to the [Offset Pagination] (https://appwrite.io/docs/pagination#offset-pagination)
166174 /// docs for more information.
167175 static String offset (int offset) =>
168176 Query ._('offset' , null , offset).toString ();
169- }
177+ }
0 commit comments