0.1.8 • Published 5 years ago

dbpouch v0.1.8

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

dbpouch

Fastest and easiest database in cloud, hosted on CDN. Work with multiple cloud databases like a PRO.
To generate access code and get API key, please read instructions on the website: https://dbpouch.com/

Usage:

var dbpouch = require("dbpouch");
var db = new dbpouch({
  database: "<test>",
  cdn: {
    email: "<email>",
    apiKey: "<apiKey>",
    domain: "<domain/space>",
    folder: "<folder>"
  }
});
db.save({name: "Apple", type: "fruit"}).then(function(data) {
  console.log(data);
}).catch(function(error) {
  console.log(error);
});

Methods:

.save(data, database);

  • data: Should be an object. Record ID should be specified as _id.
    Example: .save({_id: "apple", name: "Apple", type: "fruit"});.
  • database: Optional if already provided when creating a new instance of the module. Useful if you want to use a different database name.

.delete(id, database);

  • id: Delete a record using its id. Example: .delete("apple");.
  • database: Optional if already provided when creating a new instance of the module. Useful if you want to use a different database name.

.get(id, database);

  • id: Fetch a record using its id. Example: .get("apple");.
  • database: Optional if already provided when creating a new instance of the module. Useful if you want to use a different database name.

.record(query, database);

  • query: Search and get the record. Examples: .record({_id: "apple"});, .record({name: "Apple"});, .record({name: "Apple", type: "fruit"});. Gets only single record if multiple records match the query.
  • database: Optional if already provided when creating a new instance of the module. Useful if you want to use a different database name.

.records(query, database);

  • query: Search and get the records. Examples: .records({_id: "apple"});, .records({name: "Apple"});, .records({type: "fruit"});.
  • database: Optional if already provided when creating a new instance of the module. Useful if you want to use a different database name.

See https://dbpouch.com/ for more information.
Copyright © DbPouch

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago