Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Fix version
  • Loading branch information
abnegate committed Oct 9, 2025
commit 0ed05822a1b810e52a797dcaea3417d2f8cb8b58
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Change Log

## 19.2.0
## 19.2.1

* Add transaction support for Databases and TablesDB

Expand Down
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: ^19.2.0
dart_appwrite: ^19.2.1
```

You can install packages from the command line:
Expand Down
2 changes: 1 addition & 1 deletion lib/client_browser.dart
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export 'src/client_browser.dart';
export 'src/client_browser.dart';
2 changes: 1 addition & 1 deletion lib/client_io.dart
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export 'src/client_io.dart';
export 'src/client_io.dart';
63 changes: 20 additions & 43 deletions lib/query.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ class Query {

Map<String, dynamic> toJson() {
final result = <String, dynamic>{};

result['method'] = method;

if (attribute != null) {
if(attribute != null) {
result['attribute'] = attribute;
}

if (values != null) {
if(values != null) {
result['values'] = values is List ? values : [values];
}

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

/// Filter resources where [attribute] is equal to [value].
///
///
/// [value] can be a single value or a list. If a list is used
/// the query will return resources where [attribute] is equal
/// to any of the values in the list.
Expand Down Expand Up @@ -154,17 +154,18 @@ class Query {
Query._('orderDesc', attribute).toString();

/// Sort results randomly.
static String orderRandom() => Query._('orderRandom').toString();
static String orderRandom() =>
Query._('orderRandom').toString();

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

/// Return results after [id].
///
///
/// Refer to the [Cursor Based Pagination](https://appwrite.io/docs/pagination#cursor-pagination)
/// docs for more information.
static String cursorAfter(String id) =>
Expand All @@ -174,51 +175,27 @@ class Query {
static String limit(int limit) => Query._('limit', null, limit).toString();

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

/// Filter resources where [attribute] is at a specific distance from the given coordinates.
static String distanceEqual(
String attribute,
List<dynamic> values,
num distance, [
bool meters = true,
]) => Query._('distanceEqual', attribute, [
[values, distance, meters],
]).toString();
static String distanceEqual(String attribute, List<dynamic> values, num distance, [bool meters = true]) =>
Query._('distanceEqual', attribute, [[values, distance, meters]]).toString();

/// Filter resources where [attribute] is not at a specific distance from the given coordinates.
static String distanceNotEqual(
String attribute,
List<dynamic> values,
num distance, [
bool meters = true,
]) => Query._('distanceNotEqual', attribute, [
[values, distance, meters],
]).toString();
static String distanceNotEqual(String attribute, List<dynamic> values, num distance, [bool meters = true]) =>
Query._('distanceNotEqual', attribute, [[values, distance, meters]]).toString();

/// Filter resources where [attribute] is at a distance greater than the specified value from the given coordinates.
static String distanceGreaterThan(
String attribute,
List<dynamic> values,
num distance, [
bool meters = true,
]) => Query._('distanceGreaterThan', attribute, [
[values, distance, meters],
]).toString();
static String distanceGreaterThan(String attribute, List<dynamic> values, num distance, [bool meters = true]) =>
Query._('distanceGreaterThan', attribute, [[values, distance, meters]]).toString();

/// Filter resources where [attribute] is at a distance less than the specified value from the given coordinates.
static String distanceLessThan(
String attribute,
List<dynamic> values,
num distance, [
bool meters = true,
]) => Query._('distanceLessThan', attribute, [
[values, distance, meters],
]).toString();
static String distanceLessThan(String attribute, List<dynamic> values, num distance, [bool meters = true]) =>
Query._('distanceLessThan', attribute, [[values, distance, meters]]).toString();

/// Filter resources where [attribute] intersects with the given geometry.
static String intersects(String attribute, List<dynamic> values) =>
Expand Down Expand Up @@ -251,4 +228,4 @@ class Query {
/// Filter resources where [attribute] does not touch the given geometry.
static String notTouches(String attribute, List<dynamic> values) =>
Query._('notTouches', attribute, [values]).toString();
}
}
2 changes: 1 addition & 1 deletion lib/role.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ class Role {
static String label(String name) {
return 'label:$name';
}
}
}
Loading
Loading