Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Add this to your package's `pubspec.yaml` file:

```yml
dependencies:
dart_appwrite: ^13.0.0
dart_appwrite: ^14.0.0
```

You can install packages from the command line:
Expand Down
18 changes: 11 additions & 7 deletions lib/query.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ class Query {
Query._(this.method, [this.attribute = null, this.values = null]);

Map<String, dynamic> toJson() {
final map = <String, dynamic>{
'method': method,
};
final map = <String, dynamic>{'method': method};

if (attribute != null) {
map['attribute'] = attribute;
Expand Down Expand Up @@ -85,12 +83,18 @@ class Query {
Query._('contains', attribute, value).toString();

static String or(List<String> queries) =>
Query._('or', null, queries.map((query) => jsonDecode(query)).toList())
.toString();
Query._(
'or',
null,
queries.map((query) => jsonDecode(query)).toList(),
).toString();

static String and(List<String> queries) =>
Query._('and', null, queries.map((query) => jsonDecode(query)).toList())
.toString();
Query._(
'and',
null,
queries.map((query) => jsonDecode(query)).toList(),
).toString();

/// Specify which attributes should be returned by the API call.
static String select(List<String> attributes) =>
Expand Down
Loading