Skip to content

Commit 0f3810f

Browse files
louwersaduh95
authored andcommitted
doc: add added tag and fix typo sqlite.md
PR-URL: #56012 Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent a6c00c2 commit 0f3810f

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

doc/api/sqlite.md

+21-1
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,10 @@ around [`sqlite3_prepare_v2()`][].
157157

158158
### `database.createSession([options])`
159159

160+
<!-- YAML
161+
added: REPLACEME
162+
-->
163+
160164
* `options` {Object} The configuration options for the session.
161165
* `table` {string} A specific table to track changes for. By default, changes to all tables are tracked.
162166
* `db` {string} Name of the database to track. This is useful when multiple databases have been added using [`ATTACH DATABASE`][]. **Default**: `'main'`.
@@ -166,14 +170,18 @@ Creates and attaches a session to the database. This method is a wrapper around
166170

167171
### `database.applyChangeset(changeset[, options])`
168172

173+
<!-- YAML
174+
added: REPLACEME
175+
-->
176+
169177
* `changeset` {Uint8Array} A binary changeset or patchset.
170178
* `options` {Object} The configuration options for how the changes will be applied.
171179
* `filter` {Function} Skip changes that, when targeted table name is supplied to this function, return a truthy value.
172180
By default, all changes are attempted.
173181
* `onConflict` {number} Determines how conflicts are handled. **Default**: `SQLITE_CHANGESET_ABORT`.
174182
* `SQLITE_CHANGESET_OMIT`: conflicting changes are omitted.
175183
* `SQLITE_CHANGESET_REPLACE`: conflicting changes replace existing values.
176-
* `SQLITE_CHANGESET_ABORT`: abort on conflict and roll back databsase.
184+
* `SQLITE_CHANGESET_ABORT`: abort on conflict and roll back database.
177185
* Returns: {boolean} Whether the changeset was applied succesfully without being aborted.
178186

179187
An exception is thrown if the database is not
@@ -199,15 +207,27 @@ targetDb.applyChangeset(changeset);
199207

200208
## Class: `Session`
201209

210+
<!-- YAML
211+
added: REPLACEME
212+
-->
213+
202214
### `session.changeset()`
203215

216+
<!-- YAML
217+
added: REPLACEME
218+
-->
219+
204220
* Returns: {Uint8Array} Binary changeset that can be applied to other databases.
205221

206222
Retrieves a changeset containing all changes since the changeset was created. Can be called multiple times.
207223
An exception is thrown if the database or the session is not open. This method is a wrapper around [`sqlite3session_changeset()`][].
208224

209225
### `session.patchset()`
210226

227+
<!-- YAML
228+
added: REPLACEME
229+
-->
230+
211231
* Returns: {Uint8Array} Binary patchset that can be applied to other databases.
212232

213233
Similar to the method above, but generates a more compact patchset. See [Changesets and Patchsets][]

0 commit comments

Comments
 (0)