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

Re: Drop a column from TAFFY

Expand Messages
  • mattrq80
    Its a bit nasty but here is a way that you need to do it is by removing it outside of TAFFY: var db = new TAFFY([ {id:1, title: Test1 }, {id:2, title: Test2 },
    Message 1 of 2 , Jul 12, 2013
    • 0 Attachment
      Its a bit nasty but here is a way that you need to do it is by removing it outside of TAFFY:

      var db = new TAFFY([
      {id:1, title:'Test1'},
      {id:2, title:'Test2'},
      {id:3, title:'Test3'},
      {id:4, title:'Test4'}
      ]);
      var dump = db().get();
      for (var i in dump) {
      if (typeof(dump[i].title)!='undefined') {
      delete dump[i].title;
      }
      }
      db().remove();
      db.insert(dump);

      --- In taffydb@yahoogroups.com, slitojitri <no_reply@...> wrote:
      >
      > Hi guys,
      > I tried to drop a column from my TAFFY DB, but it didn't work... so I
      > cannot find a good way to do it.This is my code:
      > mydb().update(function() { if (typeof(this.found)!='undefined')
      > delete this.found; return this;});
      > After that, I still find the "found" column in my DB.
      > Can you suggest a way to "drop" a column from my TAFFY?
      > Thanks!
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.