PeakDB
  • Introduction
  • Quick Start
  • Change Log
  • Reference
    • Bitwise Permission Flags
    • Supported Node.js Versions
    • NPM
    • GitHub
  • Constructors
    • Server
    • Connection
    • Collection
  • Classes
    • Collection
      • createBackup
      • loadBackup
      • drop
    • DocumentBasedCollection
      • insert
      • find
      • filter
      • has
      • update
      • archive
      • unarchive
      • delete
    • KeyValueBasedCollection
      • set
      • get
      • push
      • remove
      • find
      • filter
      • has
      • increase
      • decrease
      • delete
Powered by GitBook
On this page
  • createBackup()
  • loadBackup(filename)
  • drop()
  1. Classes

Collection

Methods that can be used regardless of collection.

createBackup()

Create a backup of the collection.

returns String<[BackupFilename]> | Boolean

Example:

example_collection.createBackup(); // -> EXAMPLE_COLLECTION_2022-03-20_AUTO.pea

loadBackup(filename)

Load a backup to the collection.

Parameter
Description

filename

returns Boolean

Example:

example_collection.loadBackup("EXAMPLE_COLLECTION_2022-03-20_AUTO.pea"); // -> true

drop()

Drop the collection.

returns Boolean

Example:

example_collection.drop(); // -> true
PreviousCollectionNextDocumentBasedCollection

Last updated 3 years ago

The filename of the backup.

String