Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update concepts docs with latest api #180

Merged
merged 1 commit into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading