-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed
Labels
sqliteIssues and PRs related to the SQLite subsystem.Issues and PRs related to the SQLite subsystem.
Description
The backup() function in Node.js SQLite bindings currently has its TypeScript type defined as returning Promise<void>. However, the actual implementation returns an Promise<number> representing the number of pages backed up.
- Example from nodejs docs https://nodejs.org/api/sqlite.html#sqlitebackupsourcedb-path-options
import { backup, DatabaseSync } from 'node:sqlite';
const sourceDb = new DatabaseSync('source.db');
const totalPagesTransferred = await backup(sourceDb, 'backup.db', {
rate: 1, // Copy one page at a time.
progress: ({ totalPages, remainingPages }) => {
console.log('Backup in progress', { totalPages, remainingPages });
},
});
console.log('Backup completed', totalPagesTransferred);Metadata
Metadata
Assignees
Labels
sqliteIssues and PRs related to the SQLite subsystem.Issues and PRs related to the SQLite subsystem.