storage: add filtering to SyncLatest (#3368)

* wip

* storage: add filtering to SyncLatest

* don't increment the record version, so intermediate changes are requested

* fix stream filter
This commit is contained in:
Caleb Doxsey 2022-05-17 22:00:23 +00:00 committed by GitHub
parent 363dd82802
commit 1669b601ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 88 additions and 49 deletions

View file

@ -40,7 +40,7 @@ type Backend interface {
// Sync syncs record changes after the specified version.
Sync(ctx context.Context, serverVersion, recordVersion uint64) (RecordStream, error)
// SyncLatest syncs all the records.
SyncLatest(ctx context.Context) (serverVersion uint64, stream RecordStream, err error)
SyncLatest(ctx context.Context, recordType string, filter FilterExpression) (serverVersion, recordVersion uint64, stream RecordStream, err error)
}
// MatchAny searches any data with a query.