Skip to content

Commit 59e4087

Browse files
louwerstargos
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 a238230 commit 59e4087

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
@@ -156,6 +156,10 @@ around [`sqlite3_prepare_v2()`][].
156156

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

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

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

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

178186
An exception is thrown if the database is not
@@ -198,15 +206,27 @@ targetDb.applyChangeset(changeset);
198206

199207
## Class: `Session`
200208

209+
<!-- YAML
210+
added: v23.3.0
211+
-->
212+
201213
### `session.changeset()`
202214

215+
<!-- YAML
216+
added: v23.3.0
217+
-->
218+
203219
* Returns: {Uint8Array} Binary changeset that can be applied to other databases.
204220

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

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

226+
<!-- YAML
227+
added: v23.3.0
228+
-->
229+
210230
* Returns: {Uint8Array} Binary patchset that can be applied to other databases.
211231

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

0 commit comments

Comments
 (0)