{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla/localForage/issues/320","labels_url":"https://api.github.com/repos/mozilla/localForage/issues/320/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/localForage/issues/320/comments","events_url":"https://api.github.com/repos/mozilla/localForage/issues/320/events","html_url":"https://github.com/mozilla/localForage/pull/320","id":51442507,"number":320,"title":"Batch writes","user":{"login":"michielbdejong","id":408412,"avatar_url":"https://avatars.githubusercontent.com/u/408412?v=3","gravatar_id":"","url":"https://api.github.com/users/michielbdejong","html_url":"https://github.com/michielbdejong","followers_url":"https://api.github.com/users/michielbdejong/followers","following_url":"https://api.github.com/users/michielbdejong/following{/other_user}","gists_url":"https://api.github.com/users/michielbdejong/gists{/gist_id}","starred_url":"https://api.github.com/users/michielbdejong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michielbdejong/subscriptions","organizations_url":"https://api.github.com/users/michielbdejong/orgs","repos_url":"https://api.github.com/users/michielbdejong/repos","events_url":"https://api.github.com/users/michielbdejong/events{/privacy}","received_events_url":"https://api.github.com/users/michielbdejong/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":28,"created_at":"2014-12-09T15:44:11Z","updated_at":"2015-03-14T17:48:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mozilla/localForage/pulls/320","html_url":"https://github.com/mozilla/localForage/pull/320","diff_url":"https://github.com/mozilla/localForage/pull/320.diff","patch_url":"https://github.com/mozilla/localForage/pull/320.patch"},"body":"Batch writes together automatically, without changing the API. Fixes #301.\r\n\r\n~~TODO: add tests~~\r\nTODO: ~~find a way to stub indexedDB, so that I can~~ test the [`doTask` and `_updateDatabase` functions](https://github.com/michielbdejong/localForage/blob/batch-writes/src/drivers/indexeddb.js#L128-L179)\r\n\r\nSorry for adding so many private funtions on the asyncStorage object, let me know if there's a better way to do this.\r\n\r\nI hope this is more or less what you were expecting, there are obviously other ways to architect the code. I'll be happy to change it if you point me to examples of what it should look like."},"comment":{"url":"https://api.github.com/repos/mozilla/localForage/issues/comments/80635875","html_url":"https://github.com/mozilla/localForage/pull/320#issuecomment-80635875","issue_url":"https://api.github.com/repos/mozilla/localForage/issues/320","id":80635875,"user":{"login":"tofumatt","id":90871,"avatar_url":"https://avatars.githubusercontent.com/u/90871?v=3","gravatar_id":"","url":"https://api.github.com/users/tofumatt","html_url":"https://github.com/tofumatt","followers_url":"https://api.github.com/users/tofumatt/followers","following_url":"https://api.github.com/users/tofumatt/following{/other_user}","gists_url":"https://api.github.com/users/tofumatt/gists{/gist_id}","starred_url":"https://api.github.com/users/tofumatt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tofumatt/subscriptions","organizations_url":"https://api.github.com/users/tofumatt/orgs","repos_url":"https://api.github.com/users/tofumatt/repos","events_url":"https://api.github.com/users/tofumatt/events{/privacy}","received_events_url":"https://api.github.com/users/tofumatt/received_events","type":"User","site_admin":false},"created_at":"2015-03-14T17:48:13Z","updated_at":"2015-03-14T17:48:13Z","body":"Now that everything is passing I'll take a look and see if we need anymore\ntests, but the suite is pretty big already, so if batch writes are still\npassing everything that's a great start. I'm getting on a flight but will\nlook at this more tomorrow.\n\n-tofumatt\nOn 14 Mar 2015 17:23, \"Michiel de Jong\" <notifications@github.com> wrote:\n\n> Rebase fixed those other four indeed, thanks.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/mozilla/localForage/pull/320#issuecomment-80611554>.\n>\n"}}