TaffyDB 2.3 - introducing .store()
- So I'm pretty sure prototyping with TaffyDB is about to get a lot more fun. Here are the changes for 2.3:
1. There is now an onDBChange event so when any change happens you can have a function that receives an entire copy of the DB.
2. db.insert() now returns a query collection with the record(s) you inserted. So db.insert().each().update() etc is now possible.
3. db.store("name") takes care of local. Example:
var abc = TAFFY();
// at this any data under the name "taffy_abc" in local storage will be loaded
// record inserted into TaffyDB and synced to localStorage under the name "taffy_abc";
What I like best about using localStorage this way is that you can easily prototype and have persistence of data across refreshes.
You can downloaded the latest version here:
On the docs are here: