PulsarBlow / aurelia-firebase

🔥 A Firebase plugin for Aurelia
https://aureliaonfire.azurewebsites.net
MIT License
23 stars 6 forks source link

Support all firebase method for saving data #3

Open RainerAtSpirit opened 8 years ago

RainerAtSpirit commented 8 years ago

It looks like that currently firebase-aurelia add only implements firebase push method.

https://github.com/PulsarBlow/aurelia-firebase/blob/master/src/collection.js#L23

add(item:any) : Promise {
    return new Promise((resolve, reject) => {
      let query = this._query.ref().push();
      query.set(item, (error) => {
        if (error) {
          reject(error);
          return;
        }
        resolve(item);
      });
    });
  }

It would be useful to support the other methods like set update transaction as well. https://www.firebase.com/docs/web/guide/saving-data.html

PulsarBlow commented 8 years ago

Hi @RainerAtSpirit

set and update are planned for the next release (0.3.0-beta)

Other advanced features like transaction, query filters/limits are on the roadmap too and will be release in a future version.