{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/localForage/pulls/comments/40483192","id":40483192,"diff_hunk":"@@ -39,6 +39,10 @@\n \n         dbInfo.keyPrefix = dbInfo.name + '/';\n \n+        if (dbInfo.storeName !== self._defaultConfig.storeName) {\n+            dbInfo.keyPrefix += dbInfo.storeName + '/';\n+        }","path":"src/drivers/localstorage.js","position":6,"original_position":6,"commit_id":"bad9d5209eb51476c22a0d3bf88ea61f92ddf202","original_commit_id":"bad9d5209eb51476c22a0d3bf88ea61f92ddf202","user":{"login":"sebweaver","id":1648321,"avatar_url":"https://avatars.githubusercontent.com/u/1648321?v=3","gravatar_id":"","url":"https://api.github.com/users/sebweaver","html_url":"https://github.com/sebweaver","followers_url":"https://api.github.com/users/sebweaver/followers","following_url":"https://api.github.com/users/sebweaver/following{/other_user}","gists_url":"https://api.github.com/users/sebweaver/gists{/gist_id}","starred_url":"https://api.github.com/users/sebweaver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebweaver/subscriptions","organizations_url":"https://api.github.com/users/sebweaver/orgs","repos_url":"https://api.github.com/users/sebweaver/repos","events_url":"https://api.github.com/users/sebweaver/events{/privacy}","received_events_url":"https://api.github.com/users/sebweaver/received_events","type":"User","site_admin":false},"body":"No issue in particular AFAIK, but necessary to fulfill the new test case of this PR.\r\n\r\nIn fact, it's surprising the support of `storeName` hasn't been implemented before. At least in the same time than the two other drivers. In any case, I didn't see anything about that in the localStorage driver.","created_at":"2015-09-25T22:54:03Z","updated_at":"2015-09-25T22:54:03Z","html_url":"https://github.com/mozilla/localForage/pull/452#discussion_r40483192","pull_request_url":"https://api.github.com/repos/mozilla/localForage/pulls/452","_links":{"self":{"href":"https://api.github.com/repos/mozilla/localForage/pulls/comments/40483192"},"html":{"href":"https://github.com/mozilla/localForage/pull/452#discussion_r40483192"},"pull_request":{"href":"https://api.github.com/repos/mozilla/localForage/pulls/452"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/localForage/pulls/452","id":46038651,"html_url":"https://github.com/mozilla/localForage/pull/452","diff_url":"https://github.com/mozilla/localForage/pull/452.diff","patch_url":"https://github.com/mozilla/localForage/pull/452.patch","issue_url":"https://api.github.com/repos/mozilla/localForage/issues/452","number":452,"state":"open","locked":false,"title":"Fix #342 : multiple stores on the same database","user":{"login":"sebweaver","id":1648321,"avatar_url":"https://avatars.githubusercontent.com/u/1648321?v=3","gravatar_id":"","url":"https://api.github.com/users/sebweaver","html_url":"https://github.com/sebweaver","followers_url":"https://api.github.com/users/sebweaver/followers","following_url":"https://api.github.com/users/sebweaver/following{/other_user}","gists_url":"https://api.github.com/users/sebweaver/gists{/gist_id}","starred_url":"https://api.github.com/users/sebweaver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebweaver/subscriptions","organizations_url":"https://api.github.com/users/sebweaver/orgs","repos_url":"https://api.github.com/users/sebweaver/repos","events_url":"https://api.github.com/users/sebweaver/events{/privacy}","received_events_url":"https://api.github.com/users/sebweaver/received_events","type":"User","site_admin":false},"body":"Implementation summary for IndexedDB:\r\n- Keep track on all running forages per database.\r\n- Wait for them to be ready before processing any new connection to the same\r\ndatabase.\r\n- Probe the current database to check if an upgrade is required (greater version\r\nor new store).\r\n- If so, upgrade the database by reopening it.\r\n- Share the final connection (original or upgraded) amongts all running forages.\r\n\r\nImplementation summary for localStorage:\r\n- Prefix the key with the store name (after database), unless it's the default\r\nname.","created_at":"2015-09-25T17:46:04Z","updated_at":"2015-09-25T22:54:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c022ae6282f8a458e8b522b423290903304c39ee","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/localForage/pulls/452/commits","review_comments_url":"https://api.github.com/repos/mozilla/localForage/pulls/452/comments","review_comment_url":"https://api.github.com/repos/mozilla/localForage/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/localForage/issues/452/comments","statuses_url":"https://api.github.com/repos/mozilla/localForage/statuses/bad9d5209eb51476c22a0d3bf88ea61f92ddf202","head":{"label":"sebweaver:issue-342-multiple-stores-on-same-db","ref":"issue-342-multiple-stores-on-same-db","sha":"bad9d5209eb51476c22a0d3bf88ea61f92ddf202","user":{"login":"sebweaver","id":1648321,"avatar_url":"https://avatars.githubusercontent.com/u/1648321?v=3","gravatar_id":"","url":"https://api.github.com/users/sebweaver","html_url":"https://github.com/sebweaver","followers_url":"https://api.github.com/users/sebweaver/followers","following_url":"https://api.github.com/users/sebweaver/following{/other_user}","gists_url":"https://api.github.com/users/sebweaver/gists{/gist_id}","starred_url":"https://api.github.com/users/sebweaver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebweaver/subscriptions","organizations_url":"https://api.github.com/users/sebweaver/orgs","repos_url":"https://api.github.com/users/sebweaver/repos","events_url":"https://api.github.com/users/sebweaver/events{/privacy}","received_events_url":"https://api.github.com/users/sebweaver/received_events","type":"User","site_admin":false},"repo":{"id":42675535,"name":"localForage","full_name":"sebweaver/localForage","owner":{"login":"sebweaver","id":1648321,"avatar_url":"https://avatars.githubusercontent.com/u/1648321?v=3","gravatar_id":"","url":"https://api.github.com/users/sebweaver","html_url":"https://github.com/sebweaver","followers_url":"https://api.github.com/users/sebweaver/followers","following_url":"https://api.github.com/users/sebweaver/following{/other_user}","gists_url":"https://api.github.com/users/sebweaver/gists{/gist_id}","starred_url":"https://api.github.com/users/sebweaver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebweaver/subscriptions","organizations_url":"https://api.github.com/users/sebweaver/orgs","repos_url":"https://api.github.com/users/sebweaver/repos","events_url":"https://api.github.com/users/sebweaver/events{/privacy}","received_events_url":"https://api.github.com/users/sebweaver/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sebweaver/localForage","description":"Offline storage, improved. Wraps IndexedDB, WebSQL, or localStorage using a simple but powerful API.","fork":true,"url":"https://api.github.com/repos/sebweaver/localForage","forks_url":"https://api.github.com/repos/sebweaver/localForage/forks","keys_url":"https://api.github.com/repos/sebweaver/localForage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sebweaver/localForage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sebweaver/localForage/teams","hooks_url":"https://api.github.com/repos/sebweaver/localForage/hooks","issue_events_url":"https://api.github.com/repos/sebweaver/localForage/issues/events{/number}","events_url":"https://api.github.com/repos/sebweaver/localForage/events","assignees_url":"https://api.github.com/repos/sebweaver/localForage/assignees{/user}","branches_url":"https://api.github.com/repos/sebweaver/localForage/branches{/branch}","tags_url":"https://api.github.com/repos/sebweaver/localForage/tags","blobs_url":"https://api.github.com/repos/sebweaver/localForage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sebweaver/localForage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sebweaver/localForage/git/refs{/sha}","trees_url":"https://api.github.com/repos/sebweaver/localForage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sebweaver/localForage/statuses/{sha}","languages_url":"https://api.github.com/repos/sebweaver/localForage/languages","stargazers_url":"https://api.github.com/repos/sebweaver/localForage/stargazers","contributors_url":"https://api.github.com/repos/sebweaver/localForage/contributors","subscribers_url":"https://api.github.com/repos/sebweaver/localForage/subscribers","subscription_url":"https://api.github.com/repos/sebweaver/localForage/subscription","commits_url":"https://api.github.com/repos/sebweaver/localForage/commits{/sha}","git_commits_url":"https://api.github.com/repos/sebweaver/localForage/git/commits{/sha}","comments_url":"https://api.github.com/repos/sebweaver/localForage/comments{/number}","issue_comment_url":"https://api.github.com/repos/sebweaver/localForage/issues/comments{/number}","contents_url":"https://api.github.com/repos/sebweaver/localForage/contents/{+path}","compare_url":"https://api.github.com/repos/sebweaver/localForage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sebweaver/localForage/merges","archive_url":"https://api.github.com/repos/sebweaver/localForage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sebweaver/localForage/downloads","issues_url":"https://api.github.com/repos/sebweaver/localForage/issues{/number}","pulls_url":"https://api.github.com/repos/sebweaver/localForage/pulls{/number}","milestones_url":"https://api.github.com/repos/sebweaver/localForage/milestones{/number}","notifications_url":"https://api.github.com/repos/sebweaver/localForage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sebweaver/localForage/labels{/name}","releases_url":"https://api.github.com/repos/sebweaver/localForage/releases{/id}","created_at":"2015-09-17T18:55:37Z","updated_at":"2015-09-17T18:55:38Z","pushed_at":"2015-09-25T17:44:55Z","git_url":"git://github.com/sebweaver/localForage.git","ssh_url":"git@github.com:sebweaver/localForage.git","clone_url":"https://github.com/sebweaver/localForage.git","svn_url":"https://github.com/sebweaver/localForage","homepage":"https://mozilla.github.io/localForage","size":3097,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"57e67d93e287b95a5544b618eaf065ea571050ae","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":14003349,"name":"localForage","full_name":"mozilla/localForage","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/localForage","description":"Offline storage, improved. Wraps IndexedDB, WebSQL, or localStorage using a simple but powerful API.","fork":false,"url":"https://api.github.com/repos/mozilla/localForage","forks_url":"https://api.github.com/repos/mozilla/localForage/forks","keys_url":"https://api.github.com/repos/mozilla/localForage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/localForage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/localForage/teams","hooks_url":"https://api.github.com/repos/mozilla/localForage/hooks","issue_events_url":"https://api.github.com/repos/mozilla/localForage/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/localForage/events","assignees_url":"https://api.github.com/repos/mozilla/localForage/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/localForage/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/localForage/tags","blobs_url":"https://api.github.com/repos/mozilla/localForage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/localForage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/localForage/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/localForage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/localForage/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/localForage/languages","stargazers_url":"https://api.github.com/repos/mozilla/localForage/stargazers","contributors_url":"https://api.github.com/repos/mozilla/localForage/contributors","subscribers_url":"https://api.github.com/repos/mozilla/localForage/subscribers","subscription_url":"https://api.github.com/repos/mozilla/localForage/subscription","commits_url":"https://api.github.com/repos/mozilla/localForage/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/localForage/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/localForage/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/localForage/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/localForage/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/localForage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/localForage/merges","archive_url":"https://api.github.com/repos/mozilla/localForage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/localForage/downloads","issues_url":"https://api.github.com/repos/mozilla/localForage/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/localForage/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/localForage/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/localForage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/localForage/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/localForage/releases{/id}","created_at":"2013-10-31T00:10:06Z","updated_at":"2015-09-25T16:00:34Z","pushed_at":"2015-09-25T17:46:04Z","git_url":"git://github.com/mozilla/localForage.git","ssh_url":"git@github.com:mozilla/localForage.git","clone_url":"https://github.com/mozilla/localForage.git","svn_url":"https://github.com/mozilla/localForage","homepage":"https://mozilla.github.io/localForage","size":5519,"stargazers_count":4761,"watchers_count":4761,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":310,"mirror_url":null,"open_issues_count":72,"forks":310,"open_issues":72,"watchers":4761,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/localForage/pulls/452"},"html":{"href":"https://github.com/mozilla/localForage/pull/452"},"issue":{"href":"https://api.github.com/repos/mozilla/localForage/issues/452"},"comments":{"href":"https://api.github.com/repos/mozilla/localForage/issues/452/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/localForage/pulls/452/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/localForage/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/localForage/pulls/452/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/localForage/statuses/bad9d5209eb51476c22a0d3bf88ea61f92ddf202"}}}}