mirror of
https://github.com/appwrite/sdk-for-flutter.git
synced 2026-04-07 19:27:41 +00:00
Merge pull request #300 from appwrite/dev
feat: Flutter SDK update for version 21.4.0
This commit is contained in:
@@ -1,5 +1,14 @@
|
||||
# Change Log
|
||||
|
||||
## 21.4.0
|
||||
|
||||
* Added upsert() to DocumentChannel and RowChannel to support upsert operations on documents and rows.
|
||||
* Added Query.contains, Query.containsAny, and Query.containsAll for enhanced filtering capabilities.
|
||||
|
||||
## 21.3.0
|
||||
|
||||
* Added memberships realtime channel helper
|
||||
|
||||
## 21.1.0
|
||||
|
||||
* Add `queries` parameter to Realtime subscriptions for filtering events
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
[](https://twitter.com/appwrite)
|
||||
[](https://appwrite.io/discord)
|
||||
|
||||
**This SDK is compatible with Appwrite server version latest. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-flutter/releases).**
|
||||
**This SDK is compatible with Appwrite server version 1.8.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-flutter/releases).**
|
||||
|
||||
Appwrite is an open-source backend as a service server that abstracts and simplifies complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the Flutter SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
|
||||
|
||||
@@ -19,7 +19,7 @@ Add this to your package's `pubspec.yaml` file:
|
||||
|
||||
```yml
|
||||
dependencies:
|
||||
appwrite: ^21.3.0
|
||||
appwrite: ^21.4.0
|
||||
```
|
||||
|
||||
You can install packages from the command line:
|
||||
|
||||
@@ -130,6 +130,7 @@ extension BucketChannel on Channel<_Bucket> {
|
||||
/// Only available on Channel<_Document>
|
||||
extension DocumentChannel on Channel<_Document> {
|
||||
Channel<_Resolved> create() => _resolve('create');
|
||||
Channel<_Resolved> upsert() => _resolve('upsert');
|
||||
Channel<_Resolved> update() => _resolve('update');
|
||||
Channel<_Resolved> delete() => _resolve('delete');
|
||||
}
|
||||
@@ -137,6 +138,7 @@ extension DocumentChannel on Channel<_Document> {
|
||||
/// Only available on Channel<_Row>
|
||||
extension RowChannel on Channel<_Row> {
|
||||
Channel<_Resolved> create() => _resolve('create');
|
||||
Channel<_Resolved> upsert() => _resolve('upsert');
|
||||
Channel<_Resolved> update() => _resolve('update');
|
||||
Channel<_Resolved> delete() => _resolve('delete');
|
||||
}
|
||||
|
||||
+16
-1
@@ -98,11 +98,26 @@ class Query {
|
||||
static String endsWith(String attribute, String value) =>
|
||||
Query._('endsWith', attribute, value).toString();
|
||||
|
||||
/// Filter resources where [attribute] contains [value]
|
||||
/// Filter resources where [attribute] contains [value].
|
||||
/// For string attributes, checks if the string contains the substring.
|
||||
/// [value] can be a single value or a list.
|
||||
///
|
||||
/// Note: For array attributes, use [containsAny] or [containsAll] instead.
|
||||
static String contains(String attribute, dynamic value) =>
|
||||
Query._('contains', attribute, value).toString();
|
||||
|
||||
/// Filter resources where [attribute] contains ANY of the specified [value]s.
|
||||
/// For array and relationship attributes, matches documents where the attribute
|
||||
/// contains at least one of the given values.
|
||||
static String containsAny(String attribute, List<dynamic> value) =>
|
||||
Query._('containsAny', attribute, value).toString();
|
||||
|
||||
/// Filter resources where [attribute] contains ALL of the specified [value]s.
|
||||
/// For array and relationship attributes, matches documents where the attribute
|
||||
/// contains every one of the given values.
|
||||
static String containsAll(String attribute, List<dynamic> value) =>
|
||||
Query._('containsAll', attribute, value).toString();
|
||||
|
||||
/// Filter resources where [attribute] does not contain [value]
|
||||
/// [value] can be a single value or a list.
|
||||
static String notContains(String attribute, dynamic value) =>
|
||||
|
||||
@@ -40,7 +40,7 @@ class ClientBrowser extends ClientBase with ClientMixin {
|
||||
'x-sdk-name': 'Flutter',
|
||||
'x-sdk-platform': 'client',
|
||||
'x-sdk-language': 'flutter',
|
||||
'x-sdk-version': '21.3.0',
|
||||
'x-sdk-version': '21.4.0',
|
||||
'X-Appwrite-Response-Format': '1.8.0',
|
||||
};
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ class ClientIO extends ClientBase with ClientMixin {
|
||||
'x-sdk-name': 'Flutter',
|
||||
'x-sdk-platform': 'client',
|
||||
'x-sdk-language': 'flutter',
|
||||
'x-sdk-version': '21.3.0',
|
||||
'x-sdk-version': '21.4.0',
|
||||
'X-Appwrite-Response-Format': '1.8.0',
|
||||
};
|
||||
|
||||
|
||||
@@ -39,9 +39,7 @@ enum OAuthProvider {
|
||||
yammer(value: 'yammer'),
|
||||
yandex(value: 'yandex'),
|
||||
zoho(value: 'zoho'),
|
||||
zoom(value: 'zoom'),
|
||||
githubImagine(value: 'githubImagine'),
|
||||
googleImagine(value: 'googleImagine');
|
||||
zoom(value: 'zoom');
|
||||
|
||||
const OAuthProvider({required this.value});
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
name: appwrite
|
||||
version: 21.3.0
|
||||
version: 21.4.0
|
||||
description: Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API
|
||||
homepage: https://appwrite.io
|
||||
repository: https://github.com/appwrite/sdk-for-flutter
|
||||
|
||||
@@ -26,6 +26,16 @@ void main() {
|
||||
.toString(),
|
||||
'databases.db1.collections.col1.documents.doc1.create');
|
||||
});
|
||||
|
||||
test('returns database channel with upsert action', () {
|
||||
expect(
|
||||
Channel.database('db1')
|
||||
.collection('col1')
|
||||
.document('doc1')
|
||||
.upsert()
|
||||
.toString(),
|
||||
'databases.db1.collections.col1.documents.doc1.upsert');
|
||||
});
|
||||
});
|
||||
|
||||
group('tablesdb()', () {
|
||||
|
||||
Reference in New Issue
Block a user