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 committed Feb 28, 2024
1 parent 6039e65 commit b37124d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion adr/ADR-31.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ $ 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.
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. Likewise, assuming there was a noticeable gap of time changing addresses, the `up_to_time` could be used as a form of temporal querying.

A `batch` parameter can be added to restrict the result set to a certain size, otherwise the server will decide when to end the batch using the same `EOB` marker message seen in Batched Mode with the addition of the `Nats-UpTo-Sequence` header

Expand Down

0 comments on commit b37124d

Please sign in to comment.