From 89c414adfeaf13f09a605a5fff459b23e7ebab3a Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Sat, 23 May 2026 16:41:30 +0200 Subject: [PATCH 1/2] doc: clarify `filter` option of `sqlite.database.applyChangeset` Signed-off-by: Antoine du Hamel --- doc/api/sqlite.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/api/sqlite.md b/doc/api/sqlite.md index e277457c00dea7..3928b097b4d0b8 100644 --- a/doc/api/sqlite.md +++ b/doc/api/sqlite.md @@ -820,8 +820,12 @@ added: * `changeset` {Uint8Array} A binary changeset or patchset. * `options` {Object} The configuration options for how the changes will be applied. - * `filter` {Function} Skip changes that, when targeted table name is supplied to this function, return a truthy value. - By default, all changes are attempted. + * `filter` {Function} for each table affected by at least + one change in the changeset, the `filter` callback is invoked with the + table name as the first argument. If the return value is falsy, then no + attempt is made to apply any changes to the table. + Otherwise, if the return value is truthy or no `filter` callback is provided, + all changes related to the table are attempted. * `onConflict` {Function} A function that determines how to handle conflicts. The function receives one argument, which can be one of the following values: From 11e157509d24eb29e466bd1f47262e967be951dc Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Sat, 23 May 2026 16:57:11 +0200 Subject: [PATCH 2/2] fixup! doc: clarify `filter` option of `sqlite.database.applyChangeset` --- doc/api/sqlite.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/api/sqlite.md b/doc/api/sqlite.md index 3928b097b4d0b8..850358ff43aa86 100644 --- a/doc/api/sqlite.md +++ b/doc/api/sqlite.md @@ -821,11 +821,11 @@ added: * `changeset` {Uint8Array} A binary changeset or patchset. * `options` {Object} The configuration options for how the changes will be applied. * `filter` {Function} for each table affected by at least - one change in the changeset, the `filter` callback is invoked with the - table name as the first argument. If the return value is falsy, then no - attempt is made to apply any changes to the table. - Otherwise, if the return value is truthy or no `filter` callback is provided, - all changes related to the table are attempted. + one change in the changeset, the `filter` callback is invoked with the + table name as the first argument. If the return value is falsy, then no + attempt is made to apply any changes to the table. + Otherwise, if the return value is truthy or no `filter` callback is provided, + all changes related to the table are attempted. * `onConflict` {Function} A function that determines how to handle conflicts. The function receives one argument, which can be one of the following values: