Skip to content

Commit

Permalink
Update adr/ADR-31.md
Browse files Browse the repository at this point in the history
Co-authored-by: Byron Ruth <b@devel.io>
  • Loading branch information
ripienaar and bruth authored Feb 28, 2024
1 parent 12db8bc commit 6039e65
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions adr/ADR-31.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@ To facilitate consistent multi key reads the `up_to_seq` and `up_to_time` keys c
Imagine we have a new bucket and we did:

```
$ nats kv put 1234.name Bob # message seq 1
$ nats kv put 1234.surname Smith # message seq 2
$ nats kv put 1234.address 1 Main Street # message seq 3
$ nats kv put 1234.address 10 Oak Lane # message seq 4 updates message 3
$ nats kv put USERS 1234.name Bob # message seq 1
$ nats kv put USERS 1234.surname Smith # message seq 2
$ nats kv put USERS 1234.address 1 Main Street # message seq 3
$ nats kv put USERS 1234.address 10 Oak Lane # message seq 4 updates message 3
```

If we did a normal multi read using `{"multi_last":["$KV.USERS.1234.>"]}` we would get the address `10 Oak Lane` returned. However, to get a record as it was at a certain point in the past we could supply the sequence or time, adding `"up_to_seq":3` to the request will return address `1 Main Street` along with the other data.
Expand Down

0 comments on commit 6039e65

Please sign in to comment.