File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -716,9 +716,11 @@ added: v22.16.0
716716 * ` target ` {string} Name of the target database. This can be ` 'main' ` (the default primary database) or any other
717717 database that have been added with [ ` ATTACH DATABASE ` ] [ ] ** Default:** ` 'main' ` .
718718 * ` rate ` {number} Number of pages to be transmitted in each batch of the backup. ** Default:** ` 100 ` .
719- * ` progress ` {Function} Callback function that will be called with the number of pages copied and the total number of
720- pages.
721- * Returns: {Promise} A promise that resolves when the backup is completed and rejects if an error occurs.
719+ * ` progress ` {Function} An optional callback function that will be called after each backup step. The argument passed
720+ to this callback is an {Object} with ` remainingPages ` and ` totalPages ` properties, describing the current progress
721+ of the backup operation.
722+ * Returns: {Promise} A promise that fulfills with the total number of backed-up pages upon completion, or rejects if an
723+ error occurs.
722724
723725This method makes a database backup. This method abstracts the [ ` sqlite3_backup_init() ` ] [ ] , [ ` sqlite3_backup_step() ` ] [ ]
724726and [ ` sqlite3_backup_finish() ` ] [ ] functions.
You can’t perform that action at this time.
0 commit comments