Skip to main content

Vacuum

Optimizes the database file, reducing its size.

  • Returns:
    • The result of the operation, includes a boolean indicating whether the operation was successful or an error if the operation failed.
if (db.vacuum().success) {
console.log("Database vacuumed successfully");
} else {
console.log(result.error.message);
}
info

Regularly run the vacuum() method to optimize the database and reduce its size.