Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0e10a8e

Browse filesBrowse files
Renegade334richardlau
authored andcommitted
doc: improve sqlite.backup() progress/fulfillment documentation
PR-URL: #59598 Refs: #56253 Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com> Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
1 parent fc3f82d commit 0e10a8e
Copy full SHA for 0e10a8e

File tree

Expand file treeCollapse file tree

1 file changed

+5
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-3
lines changed
Open diff view settings
Collapse file

‎doc/api/sqlite.md‎

Copy file name to clipboardExpand all lines: doc/api/sqlite.md
+5-3Lines changed: 5 additions & 3 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff 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

723725
This method makes a database backup. This method abstracts the [`sqlite3_backup_init()`][], [`sqlite3_backup_step()`][]
724726
and [`sqlite3_backup_finish()`][] functions.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.