Skip to content

Commit 74a4d6b

Browse files
committed
Commit from GitHub Actions (Format and push)
1 parent c20d7e0 commit 74a4d6b

160 files changed

Lines changed: 7867 additions & 8028 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

lib/appwrite.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/// Appwrite Flutter SDK
22
///
3-
/// This SDK is compatible with Appwrite server version 1.8.x.
3+
/// This SDK is compatible with Appwrite server version 1.8.x.
44
/// For older versions, please check
55
/// [previous releases](https://github.com/appwrite/sdk-for-flutter/releases).
66
library appwrite;

lib/channel.dart

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,31 @@ part of appwrite;
22

33
// Marker classes for type safety
44
class _Root {}
5+
56
class _Database {}
7+
68
class _Collection {}
9+
710
class _Document {}
11+
812
class _TablesDB {}
13+
914
class _Table {}
15+
1016
class _Row {}
17+
1118
class _Bucket {}
19+
1220
class _File {}
21+
1322
class _Func {}
23+
1424
class _Execution {}
25+
1526
class _Team {}
27+
1628
class _Membership {}
29+
1730
class _Resolved {}
1831

1932
// Helper function for normalizing ID
@@ -88,15 +101,15 @@ extension DatabaseChannel on Channel<_Database> {
88101

89102
/// Only available on Channel<_Collection>
90103
extension CollectionChannel on Channel<_Collection> {
91-
Channel<_Document> document([String? id]) => _next<_Document>('documents', id);
104+
Channel<_Document> document([String? id]) =>
105+
_next<_Document>('documents', id);
92106
}
93107

94108
// --- TABLESDB ROUTE ---
95109

96110
/// Only available on Channel<_TablesDB>
97111
extension TablesDBChannel on Channel<_TablesDB> {
98-
Channel<_Table> table([String? id]) =>
99-
_next<_Table>('tables', id ?? '*');
112+
Channel<_Table> table([String? id]) => _next<_Table>('tables', id ?? '*');
100113
}
101114

102115
/// Only available on Channel<_Table>

lib/client_browser.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export 'src/client_browser.dart';
1+
export 'src/client_browser.dart';

lib/client_io.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export 'src/client_io.dart';
1+
export 'src/client_io.dart';

lib/operator.dart

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Operator {
3131

3232
result['method'] = method;
3333

34-
if(values != null) {
34+
if (values != null) {
3535
result['values'] = values is List ? values : [values];
3636
}
3737

@@ -147,8 +147,7 @@ class Operator {
147147
Operator._('arrayRemove', [value]).toString();
148148

149149
/// Remove duplicate values from an array attribute.
150-
static String arrayUnique() =>
151-
Operator._('arrayUnique', []).toString();
150+
static String arrayUnique() => Operator._('arrayUnique', []).toString();
152151

153152
/// Keep only values that exist in both the current array and the provided array.
154153
static String arrayIntersect(List<dynamic> values) =>
@@ -173,8 +172,7 @@ class Operator {
173172
Operator._('stringReplace', [search, replace]).toString();
174173

175174
/// Toggle a boolean attribute.
176-
static String toggle() =>
177-
Operator._('toggle', []).toString();
175+
static String toggle() => Operator._('toggle', []).toString();
178176

179177
/// Add days to a date attribute.
180178
static String dateAddDays(int days) =>
@@ -185,6 +183,5 @@ class Operator {
185183
Operator._('dateSubDays', [days]).toString();
186184

187185
/// Set a date attribute to the current date and time.
188-
static String dateSetNow() =>
189-
Operator._('dateSetNow', []).toString();
186+
static String dateSetNow() => Operator._('dateSetNow', []).toString();
190187
}

lib/query.dart

Lines changed: 51 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ class Query {
1010

1111
Map<String, dynamic> toJson() {
1212
final result = <String, dynamic>{};
13-
13+
1414
result['method'] = method;
15-
16-
if(attribute != null) {
15+
16+
if (attribute != null) {
1717
result['attribute'] = attribute;
1818
}
19-
20-
if(values != null) {
19+
20+
if (values != null) {
2121
result['values'] = values is List ? values : [values];
2222
}
2323

@@ -28,7 +28,7 @@ class Query {
2828
String toString() => jsonEncode(toJson());
2929

3030
/// Filter resources where [attribute] is equal to [value].
31-
///
31+
///
3232
/// [value] can be a single value or a list. If a list is used
3333
/// the query will return resources where [attribute] is equal
3434
/// to any of the values in the list.
@@ -140,50 +140,46 @@ class Query {
140140
Query._('notEndsWith', attribute, value).toString();
141141

142142
/// Filter resources where document was created before [value].
143-
static String createdBefore(String value) =>
144-
lessThan('\$createdAt', value);
143+
static String createdBefore(String value) => lessThan('\$createdAt', value);
145144

146145
/// Filter resources where document was created after [value].
147-
static String createdAfter(String value) =>
148-
greaterThan('\$createdAt', value);
146+
static String createdAfter(String value) => greaterThan('\$createdAt', value);
149147

150148
/// Filter resources where document was created between [start] and [end] (inclusive).
151149
static String createdBetween(String start, String end) =>
152150
between('\$createdAt', start, end);
153151

154152
/// Filter resources where document was updated before [value].
155-
static String updatedBefore(String value) =>
156-
lessThan('\$updatedAt', value);
153+
static String updatedBefore(String value) => lessThan('\$updatedAt', value);
157154

158155
/// Filter resources where document was updated after [value].
159-
static String updatedAfter(String value) =>
160-
greaterThan('\$updatedAt', value);
156+
static String updatedAfter(String value) => greaterThan('\$updatedAt', value);
161157

162158
/// Filter resources where document was updated between [start] and [end] (inclusive).
163159
static String updatedBetween(String start, String end) =>
164160
between('\$updatedAt', start, end);
165161

166162
static String or(List<String> queries) => Query._(
167-
'or',
168-
null,
169-
queries.map((query) => jsonDecode(query)).toList(),
170-
).toString();
163+
'or',
164+
null,
165+
queries.map((query) => jsonDecode(query)).toList(),
166+
).toString();
171167

172168
static String and(List<String> queries) => Query._(
173-
'and',
174-
null,
175-
queries.map((query) => jsonDecode(query)).toList(),
176-
).toString();
169+
'and',
170+
null,
171+
queries.map((query) => jsonDecode(query)).toList(),
172+
).toString();
177173

178174
/// Filter array elements where at least one element matches all the specified queries.
179175
///
180176
/// [attribute] The attribute containing the array to filter on.
181177
/// [queries] The list of query strings to match against array elements.
182178
static String elemMatch(String attribute, List<String> queries) => Query._(
183-
'elemMatch',
184-
attribute,
185-
queries.map((query) => jsonDecode(query)).toList(),
186-
).toString();
179+
'elemMatch',
180+
attribute,
181+
queries.map((query) => jsonDecode(query)).toList(),
182+
).toString();
187183

188184
/// Specify which attributes should be returned by the API call.
189185
static String select(List<String> attributes) =>
@@ -198,18 +194,17 @@ class Query {
198194
Query._('orderDesc', attribute).toString();
199195

200196
/// Sort results randomly.
201-
static String orderRandom() =>
202-
Query._('orderRandom').toString();
197+
static String orderRandom() => Query._('orderRandom').toString();
203198

204199
/// Return results before [id].
205-
///
200+
///
206201
/// Refer to the [Cursor Based Pagination](https://appwrite.io/docs/pagination#cursor-pagination)
207202
/// docs for more information.
208203
static String cursorBefore(String id) =>
209204
Query._('cursorBefore', null, id).toString();
210205

211206
/// Return results after [id].
212-
///
207+
///
213208
/// Refer to the [Cursor Based Pagination](https://appwrite.io/docs/pagination#cursor-pagination)
214209
/// docs for more information.
215210
static String cursorAfter(String id) =>
@@ -219,27 +214,43 @@ class Query {
219214
static String limit(int limit) => Query._('limit', null, limit).toString();
220215

221216
/// Return results from [offset].
222-
///
217+
///
223218
/// Refer to the [Offset Pagination](https://appwrite.io/docs/pagination#offset-pagination)
224219
/// docs for more information.
225220
static String offset(int offset) =>
226221
Query._('offset', null, offset).toString();
227222

228223
/// Filter resources where [attribute] is at a specific distance from the given coordinates.
229-
static String distanceEqual(String attribute, List<dynamic> values, num distance, [bool meters = true]) =>
230-
Query._('distanceEqual', attribute, [[values, distance, meters]]).toString();
224+
static String distanceEqual(
225+
String attribute, List<dynamic> values, num distance,
226+
[bool meters = true]) =>
227+
Query._('distanceEqual', attribute, [
228+
[values, distance, meters]
229+
]).toString();
231230

232231
/// Filter resources where [attribute] is not at a specific distance from the given coordinates.
233-
static String distanceNotEqual(String attribute, List<dynamic> values, num distance, [bool meters = true]) =>
234-
Query._('distanceNotEqual', attribute, [[values, distance, meters]]).toString();
232+
static String distanceNotEqual(
233+
String attribute, List<dynamic> values, num distance,
234+
[bool meters = true]) =>
235+
Query._('distanceNotEqual', attribute, [
236+
[values, distance, meters]
237+
]).toString();
235238

236239
/// Filter resources where [attribute] is at a distance greater than the specified value from the given coordinates.
237-
static String distanceGreaterThan(String attribute, List<dynamic> values, num distance, [bool meters = true]) =>
238-
Query._('distanceGreaterThan', attribute, [[values, distance, meters]]).toString();
240+
static String distanceGreaterThan(
241+
String attribute, List<dynamic> values, num distance,
242+
[bool meters = true]) =>
243+
Query._('distanceGreaterThan', attribute, [
244+
[values, distance, meters]
245+
]).toString();
239246

240247
/// Filter resources where [attribute] is at a distance less than the specified value from the given coordinates.
241-
static String distanceLessThan(String attribute, List<dynamic> values, num distance, [bool meters = true]) =>
242-
Query._('distanceLessThan', attribute, [[values, distance, meters]]).toString();
248+
static String distanceLessThan(
249+
String attribute, List<dynamic> values, num distance,
250+
[bool meters = true]) =>
251+
Query._('distanceLessThan', attribute, [
252+
[values, distance, meters]
253+
]).toString();
243254

244255
/// Filter resources where [attribute] intersects with the given geometry.
245256
static String intersects(String attribute, List<dynamic> values) =>
@@ -272,4 +283,4 @@ class Query {
272283
/// Filter resources where [attribute] does not touch the given geometry.
273284
static String notTouches(String attribute, List<dynamic> values) =>
274285
Query._('notTouches', attribute, [values]).toString();
275-
}
286+
}

lib/realtime_browser.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export 'src/realtime_browser.dart';
1+
export 'src/realtime_browser.dart';

lib/realtime_io.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export 'src/realtime_io.dart';
1+
export 'src/realtime_io.dart';

lib/role.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,4 @@ class Role {
6363
static String label(String name) {
6464
return 'label:$name';
6565
}
66-
}
66+
}

0 commit comments

Comments
 (0)