benbahrenburg/TiTaffyDb — pull request #5 by ricardoalcocer (2013-08-06 22:03:16+00:00)
Title: Added functionality for contructing the TAFFY object with initial data

This change allows you to call the TAFFY constructor with initial data. It adds a 3rd parameter:

var inJSON=[
{playlistname:'Playlist 1',songname:'p1song1.mp3'},
{playlistname:'Playlist 1',songname:'p1song2.mp3'},
{playlistname:'Playlist 1',songname:'p1song3.mp3'},
{playlistname:'Playlist 1',songname:'p1song4.mp3'},
{playlistname:'Playlist 2',songname:'p2song1.mp3'},
{playlistname:'Playlist 2',songname:'p2song2.mp3'},
{playlistname:'Playlist 2',songname:'p2song3.mp3'}
];

var my_db = new taffy('data_store_name',{autocommit:true},inJSON);

Sample usage can be found in this blog post:

http://ricardoalcocer.com/index.php?post=taffydb-with-titanium