Global

Methods

(async) createCollection(name, callback)

Creates a new collection under the connected database.
Parameters:
Name Type Description
name string Name of the collection
callback string An optional callback function
Source:
Example
waterview.createCollection('users', function(err){
     if(err)
       console.log(err);
})

(async) getAll(collection, callback) → {array}

Retrives all entities in a collection
Parameters:
Name Type Description
collection string Name of the collection
callback string An optional callback function
Source:
Yields:
Yields an array of all entities in the collection.
Type
array