From d9cb8468a3763aff6128274f321f524b91cb83ee Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Tue, 26 May 2026 15:41:13 +0200 Subject: [PATCH] doc: clarify `filter` option of `sqlite.database.applyChangeset` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Antoine du Hamel PR-URL: https://github.com/nodejs/node/pull/63515 Reviewed-By: Colin Ihrig Reviewed-By: Edy Silva Signed-off-by: Juan José Arboleda --- 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 cb41b456d26..739be4ccd44 100644 --- a/doc/api/sqlite.md +++ b/doc/api/sqlite.md @@ -366,8 +366,12 @@ added: v22.12.0 * `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: