Skip to content

Commit 205c3ce

Browse files
aduh95marco-ippolito
authored andcommitted
doc: clarify filter option of sqlite.database.applyChangeset
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com> PR-URL: #63515 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
1 parent bc3a68d commit 205c3ce

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

doc/api/sqlite.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,8 +392,12 @@ added: v22.12.0
392392

393393
* `changeset` {Uint8Array} A binary changeset or patchset.
394394
* `options` {Object} The configuration options for how the changes will be applied.
395-
* `filter` {Function} Skip changes that, when targeted table name is supplied to this function, return a truthy value.
396-
By default, all changes are attempted.
395+
* `filter` {Function} for each table affected by at least
396+
one change in the changeset, the `filter` callback is invoked with the
397+
table name as the first argument. If the return value is falsy, then no
398+
attempt is made to apply any changes to the table.
399+
Otherwise, if the return value is truthy or no `filter` callback is provided,
400+
all changes related to the table are attempted.
397401
* `onConflict` {Function} A function that determines how to handle conflicts. The function receives one argument,
398402
which can be one of the following values:
399403

0 commit comments

Comments
 (0)