Documentation

With the Firefast SDK, you can read and write realtime database data:

1. Read data from a path

var db = firebase.database();
var ref = db.ref("/some_resource");
ref.once("value").then(function(snapshot) {
  console.log(snapshot.val());
});

2. Write or replace data in a path

var db = firebase.database();
var ref = db.ref("/some_resource");
ref.set({name:"value"}).then(function(rslt) {
  console.log(rslt);
});

3. Update some of the keys in a path without replacing all of the data

var db = firebase.database();
var ref = db.ref("/some_resource");
ref.update({name:"value"}).then(function(rslt) {
  console.log(rslt);
});

4. Add to a list of data in the database

var db = firebase.database();
var ref = db.ref("/some_resource");
ref.push({name:"value"}).then(function(rslt) {
  console.log(rslt);
});

5. Delete data in a path

var db = firebase.database();
var ref = db.ref("/some_resource");
ref.remove().then(function(rslt) {
  console.log(rslt);
});

6. Query data from the database

TBD

Made with formfacade