You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/brick_offline_first_with_supabase/CHANGELOG.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,8 @@
1
+
## 2.1.0
2
+
3
+
- Use `SupabaseProvider#subscribeToRealtime` to generate the channel used by `OfflineFirstWithSupabaseRepository#subscribeToRealtime`
4
+
-**Breaking Change** protected method `OfflineFirstWithSupabaseRepository#queryToPostgresChangeFilter` has been moved to `SupabaseProvider#queryToPostgresChangeFilter`. Implementations should override this method in `SupabaseProvider` instead.
final adapter = remoteProvider.modelDictionary.adapterFor[TModel]!;
215
-
if (query.where?.isEmpty ??true) returnnull;
216
-
final condition = query.where!.first;
217
-
final column = adapter.fieldsToSupabaseColumns[condition.evaluatedField]?.columnName;
218
-
219
-
if (column ==null) returnnull;
220
-
221
-
final type =_compareToFilterParam(condition.compare);
222
-
if (type ==null) returnnull;
223
-
224
-
returnPostgresChangeFilter(
225
-
type: type,
226
-
column: column,
227
-
value: condition.value,
228
-
);
229
-
}
230
-
231
207
@override
232
208
Future<void> reset() async {
233
209
awaitsuper.reset();
@@ -264,8 +240,7 @@ abstract class OfflineFirstWithSupabaseRepository<
264
240
///
265
241
/// [query] is an optional query to filter the data. The query **must be** one level -
266
242
/// `Query.where('user', Query.exact('name', 'Tom'))` is invalid but `Query.where('name', 'Tom')`
267
-
/// is valid. The [Compare] operator is limited to a [PostgresChangeFilterType] equivalent.
268
-
/// See [_compareToFilterParam] for a precise breakdown.
243
+
/// is valid. The [Compare] operator is limited to a [PostgresChangeFilterType] equivalent. See [SupabaseProvider.queryToPostgresChangeFilter] for more details.
Copy file name to clipboardExpand all lines: packages/brick_supabase/CHANGELOG.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,8 @@
1
+
## 2.1.0
2
+
3
+
- Add `SupabaseProvider#subscribeToRealtime` to subscribe to [Supabase channels](https://supabase.com/docs/guides/realtime?queryGroups=language&language=dart).
4
+
- Add `SupabaseProvider#queryToPostgresChangeFilter` to convert `Query`s for Supabase subscriptions
5
+
1
6
## 2.0.0
2
7
3
8
-**BREAKING CHANGE**`Query(providerArgs:)` is no longer supported; see [1.2.0](#1.2.0) for migration steps
0 commit comments