Limit a sync expression to a maximum number of records
Description
When creating a sync expression for DataStore it seems that the only things you can do to prevent the app from syncing the entire model's database is to do a query predicate that:
- acts more like a chained filtering system (ex: all records where author = 'someauthor' and in the last 7 days) => which is nice, but still doesn't guarantee you won't be syncing more records for that model than you'd like to
- id = null => to completely disregard syncing that model (also a nice feature, but not what I'm looking for).
I want to be able to place a limit on the number of records that will sync (at a maximum) on a per model basis.
This is mainly for performance issues, where I want to guarantee an approximate maximum wait time before the app is synced.
This is a feature request.
Categories
- [ ] Analytics
- [ ] API (REST)
- [ ] API (GraphQL)
- [ ] Auth
- [ ] Authenticator
- [X] DataStore
- [ ] Notifications (Push)
- [ ] Storage
Steps to Reproduce
No response
Screenshots
No response
Platforms
- [X] iOS
- [X] Android
- [ ] Web
- [ ] macOS
- [ ] Windows
- [ ] Linux
Flutter Version
newest
Amplify Flutter Version
newest
Deployment Method
Amplify CLI
Schema
No response
Hello @adplant - Thanks for opening this request. I have labelled this as a feature request. We will use this issue to track interest in this request.
+1 for setting sync limits on a per model basis please