rocicorp / repc

The canonical Replicache client, implemented in Rust.
Other
31 stars 7 forks source link

ScanOptions probably needs to be able to take the secondary key for the start key as well #259

Closed aboodman closed 3 years ago

aboodman commented 3 years ago

Imagine that you are building some paginated UI from an index. You want to be able to scan starting at the last record you have seen.

Over indexes, records are uniquely identified by both their secondary and primary keys. Therefore ScanOptions.startKey needs to be able to accept both.

Low priority at the moment, but this will be an annoyance for Cron.

aboodman commented 3 years ago

@phritz - sorry I didn't think of this sooner.

aboodman commented 3 years ago

This would basically make the input API to scan symmetrical with the output API (which sends both secondary and primary keys), so makes sense to me.