📜
WastefulDB Docs
WastefulDB
WastefulDB
  • Constructor Setup
  • Specifying Directories
  • Retrieval Functions
  • Document Functions
Powered by GitBook
On this page

Specifying Directories

With each function there is an optional parameter, {dir}, which allows the user to provide an argument pointing to a specific directory. When given a valid directory, that specific function will execute within it.

When a directory is not specified, it will default to the given path argument in the constructor. If that also isn't specified, the default path will be "./data/".


// Ensure that a forward slash is present at the end.
db.find({id: "1234"}, {dir: "./data/"});

db.insert({id: "5555", "name": "Bart", pass: "123456"}, {dir: "./data/passwd/"});
PreviousConstructor SetupNextRetrieval Functions

Last updated 11 months ago