amplify-flutter icon indicating copy to clipboard operation
amplify-flutter copied to clipboard

Limit a sync expression to a maximum number of records

Open adplant opened this issue 2 years ago • 2 comments

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:

  1. 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
  2. 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

adplant avatar Nov 03 '23 22:11 adplant

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.

Jordan-Nelson avatar Nov 06 '23 17:11 Jordan-Nelson

+1 for setting sync limits on a per model basis please

fabilo-au avatar Apr 29 '24 02:04 fabilo-au