rocicorp / repc

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

scan clean ups and enable scanning indexes by primary key #261

Closed phritz closed 3 years ago

phritz commented 3 years ago

separate logical commits

@arv this is an interface change.

  1. start_key_exclusive => start_exclusive
  2. for index scans we previously passed the secondary key value we are scanning for in start_key. however, we want to enable scanning indexes by both primary and secondary key values. so now you need to pass the secondary key value to scan for in start_secondary_key and the primary key value if any in start_key. note that for index scans the primary key (start_key) is optional and should be omitted entirely from the serialized form if not used. see comment in last commit but the difference is that in index scans specifying start_key forces an exact match on start_secondary_key. if this is too confusing then we can add a separate field.

progress towards #218

closes https://github.com/rocicorp/repc/issues/259