Loading ...
Sorry, an error occurred while loading the content.

TaffyDB 2.3 - introducing .store()

Expand Messages
  • taffydb-owner@yahoogroups.com
    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
    Message 1 of 1 , Sep 23, 2011
    • 0 Attachment
      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();
      abc.store("abc");
      // at this any data under the name "taffy_abc" in local storage will be loaded
      abc.insert({stuff:1});
      // 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:
      https://github.com/typicaljoe/taffydb

      On the docs are here:
      http://taffydb.com
    Your message has been successfully submitted and would be delivered to recipients shortly.