Skip to content

Commit

Permalink
docs: update concepts docs with latest api
Browse files Browse the repository at this point in the history
  • Loading branch information
mschristensen committed May 9, 2024
1 parent 3a5aa2e commit 5d96123
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion docs/replay.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export type SyncFunc<T, P extends any[] | [] = []> = (...args: P) => Promise<{ d
> Note that if you are using [`adbc`](https://github.com/ably-labs/adbc/), this is the `sequence_id` of the corresponding outbox record, which is a serial integer. The sequence ID to return from your sync function endpoint can therefore be obtained by selecting the largest `sequence_id` in the outbox table. This should be done in the same transaction in which the model state is read from the database.
>
> ```sql
> SELECT MAX(sequence_id) FROM outbox;
> SELECT COALESCE(MAX(sequence_id), 0) FROM outbox;
> ```
>
> Note that you should not rely on the sequence itself with e.g. `SELECT nextval('outbox_sequence_id_seq')::integer` as the sequence may be incremented by other concurrent transactions without the effects of those transactions being visible to the transaction that reads the state of the model.
Expand Down
1 change: 0 additions & 1 deletion docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ To instantiate a `Model` you must provide a unique name to identify the model in

```ts
const model = modelsClient.models.get({
name: 'myPost',
channelName: 'post:123',
sync: /* ... */,
merge: /* ... */,
Expand Down

0 comments on commit 5d96123

Please sign in to comment.