{"action":"created","comment":{"url":"https://api.github.com/repos/snmlabs/snm001/pulls/comments/219658331","pull_request_review_id":157895733,"id":219658331,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxOTY1ODMzMQ==","diff_hunk":"@@ -133,6 +135,31 @@ public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) {\n     });\n   }\n \n+  /**\n+   * Performs a bulk insert of all the given entries into the map. This is an atomic operation.\n+   *\n+   * @param songMap Map from song id to song info which have to be written to the database.\n+   */\n+  public Future<Void> insertAll(Map<Integer, SongInfo> songMap) {\n+    return executor.submit(() -> {\n+      SQLiteDatabase db = this.getWritableDatabase();\n+      db.beginTransaction();\n+\n+      try {\n+        for (Entry<Integer, SongInfo> entry : songMap.entrySet()) {\n+          ContentValues values = buildContentValues(entry.getValue());\n+          values.put(SongEntry._ID, entry.getKey());\n+          db.insertWithOnConflict(SongEntry.TABLE_NAME, null, values,\n+              SQLiteDatabase.CONFLICT_REPLACE);\n+        }\n+        db.setTransactionSuccessful();\n+      } finally {\n+        db.endTransaction();\n+      }\n+      return null;","path":"app/src/main/java/com/bhakti/db/tables/SongsTable.java","position":34,"original_position":34,"commit_id":"fba389b4b45c9596aaaa0833c06264c9dcffa932","original_commit_id":"063212ccc3022917f612f451da9d1f0edf72c30e","user":{"login":"snmlabs","id":43287455,"node_id":"MDQ6VXNlcjQzMjg3NDU1","avatar_url":"https://avatars2.githubusercontent.com/u/43287455?v=4","gravatar_id":"","url":"https://api.github.com/users/snmlabs","html_url":"https://github.com/snmlabs","followers_url":"https://api.github.com/users/snmlabs/followers","following_url":"https://api.github.com/users/snmlabs/following{/other_user}","gists_url":"https://api.github.com/users/snmlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/snmlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snmlabs/subscriptions","organizations_url":"https://api.github.com/users/snmlabs/orgs","repos_url":"https://api.github.com/users/snmlabs/repos","events_url":"https://api.github.com/users/snmlabs/events{/privacy}","received_events_url":"https://api.github.com/users/snmlabs/received_events","type":"User","site_admin":false},"body":"Yes, we need this for lambdas","created_at":"2018-09-22T02:00:55Z","updated_at":"2018-09-22T02:06:21Z","html_url":"https://github.com/snmlabs/snm001/pull/3#discussion_r219658331","pull_request_url":"https://api.github.com/repos/snmlabs/snm001/pulls/3","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/snmlabs/snm001/pulls/comments/219658331"},"html":{"href":"https://github.com/snmlabs/snm001/pull/3#discussion_r219658331"},"pull_request":{"href":"https://api.github.com/repos/snmlabs/snm001/pulls/3"}},"in_reply_to_id":219656221},"pull_request":{"url":"https://api.github.com/repos/snmlabs/snm001/pulls/3","id":217186214,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE3MTg2MjE0","html_url":"https://github.com/snmlabs/snm001/pull/3","diff_url":"https://github.com/snmlabs/snm001/pull/3.diff","patch_url":"https://github.com/snmlabs/snm001/pull/3.patch","issue_url":"https://api.github.com/repos/snmlabs/snm001/issues/3","number":3,"state":"open","locked":false,"title":"Add SongsTableTest","user":{"login":"adityahemanth","id":10472368,"node_id":"MDQ6VXNlcjEwNDcyMzY4","avatar_url":"https://avatars0.githubusercontent.com/u/10472368?v=4","gravatar_id":"","url":"https://api.github.com/users/adityahemanth","html_url":"https://github.com/adityahemanth","followers_url":"https://api.github.com/users/adityahemanth/followers","following_url":"https://api.github.com/users/adityahemanth/following{/other_user}","gists_url":"https://api.github.com/users/adityahemanth/gists{/gist_id}","starred_url":"https://api.github.com/users/adityahemanth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adityahemanth/subscriptions","organizations_url":"https://api.github.com/users/adityahemanth/orgs","repos_url":"https://api.github.com/users/adityahemanth/repos","events_url":"https://api.github.com/users/adityahemanth/events{/privacy}","received_events_url":"https://api.github.com/users/adityahemanth/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-09-21T06:45:45Z","updated_at":"2018-09-22T02:06:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bb5e4b124631413f2ee433fffb62ffe1cba01cba","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/snmlabs/snm001/pulls/3/commits","review_comments_url":"https://api.github.com/repos/snmlabs/snm001/pulls/3/comments","review_comment_url":"https://api.github.com/repos/snmlabs/snm001/pulls/comments{/number}","comments_url":"https://api.github.com/repos/snmlabs/snm001/issues/3/comments","statuses_url":"https://api.github.com/repos/snmlabs/snm001/statuses/fba389b4b45c9596aaaa0833c06264c9dcffa932","head":{"label":"snmlabs:dataModels","ref":"dataModels","sha":"fba389b4b45c9596aaaa0833c06264c9dcffa932","user":{"login":"snmlabs","id":43287455,"node_id":"MDQ6VXNlcjQzMjg3NDU1","avatar_url":"https://avatars2.githubusercontent.com/u/43287455?v=4","gravatar_id":"","url":"https://api.github.com/users/snmlabs","html_url":"https://github.com/snmlabs","followers_url":"https://api.github.com/users/snmlabs/followers","following_url":"https://api.github.com/users/snmlabs/following{/other_user}","gists_url":"https://api.github.com/users/snmlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/snmlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snmlabs/subscriptions","organizations_url":"https://api.github.com/users/snmlabs/orgs","repos_url":"https://api.github.com/users/snmlabs/repos","events_url":"https://api.github.com/users/snmlabs/events{/privacy}","received_events_url":"https://api.github.com/users/snmlabs/received_events","type":"User","site_admin":false},"repo":{"id":148868408,"node_id":"MDEwOlJlcG9zaXRvcnkxNDg4Njg0MDg=","name":"snm001","full_name":"snmlabs/snm001","private":false,"owner":{"login":"snmlabs","id":43287455,"node_id":"MDQ6VXNlcjQzMjg3NDU1","avatar_url":"https://avatars2.githubusercontent.com/u/43287455?v=4","gravatar_id":"","url":"https://api.github.com/users/snmlabs","html_url":"https://github.com/snmlabs","followers_url":"https://api.github.com/users/snmlabs/followers","following_url":"https://api.github.com/users/snmlabs/following{/other_user}","gists_url":"https://api.github.com/users/snmlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/snmlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snmlabs/subscriptions","organizations_url":"https://api.github.com/users/snmlabs/orgs","repos_url":"https://api.github.com/users/snmlabs/repos","events_url":"https://api.github.com/users/snmlabs/events{/privacy}","received_events_url":"https://api.github.com/users/snmlabs/received_events","type":"User","site_admin":false},"html_url":"https://github.com/snmlabs/snm001","description":"An android music player prototype","fork":false,"url":"https://api.github.com/repos/snmlabs/snm001","forks_url":"https://api.github.com/repos/snmlabs/snm001/forks","keys_url":"https://api.github.com/repos/snmlabs/snm001/keys{/key_id}","collaborators_url":"https://api.github.com/repos/snmlabs/snm001/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/snmlabs/snm001/teams","hooks_url":"https://api.github.com/repos/snmlabs/snm001/hooks","issue_events_url":"https://api.github.com/repos/snmlabs/snm001/issues/events{/number}","events_url":"https://api.github.com/repos/snmlabs/snm001/events","assignees_url":"https://api.github.com/repos/snmlabs/snm001/assignees{/user}","branches_url":"https://api.github.com/repos/snmlabs/snm001/branches{/branch}","tags_url":"https://api.github.com/repos/snmlabs/snm001/tags","blobs_url":"https://api.github.com/repos/snmlabs/snm001/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/snmlabs/snm001/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/snmlabs/snm001/git/refs{/sha}","trees_url":"https://api.github.com/repos/snmlabs/snm001/git/trees{/sha}","statuses_url":"https://api.github.com/repos/snmlabs/snm001/statuses/{sha}","languages_url":"https://api.github.com/repos/snmlabs/snm001/languages","stargazers_url":"https://api.github.com/repos/snmlabs/snm001/stargazers","contributors_url":"https://api.github.com/repos/snmlabs/snm001/contributors","subscribers_url":"https://api.github.com/repos/snmlabs/snm001/subscribers","subscription_url":"https://api.github.com/repos/snmlabs/snm001/subscription","commits_url":"https://api.github.com/repos/snmlabs/snm001/commits{/sha}","git_commits_url":"https://api.github.com/repos/snmlabs/snm001/git/commits{/sha}","comments_url":"https://api.github.com/repos/snmlabs/snm001/comments{/number}","issue_comment_url":"https://api.github.com/repos/snmlabs/snm001/issues/comments{/number}","contents_url":"https://api.github.com/repos/snmlabs/snm001/contents/{+path}","compare_url":"https://api.github.com/repos/snmlabs/snm001/compare/{base}...{head}","merges_url":"https://api.github.com/repos/snmlabs/snm001/merges","archive_url":"https://api.github.com/repos/snmlabs/snm001/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/snmlabs/snm001/downloads","issues_url":"https://api.github.com/repos/snmlabs/snm001/issues{/number}","pulls_url":"https://api.github.com/repos/snmlabs/snm001/pulls{/number}","milestones_url":"https://api.github.com/repos/snmlabs/snm001/milestones{/number}","notifications_url":"https://api.github.com/repos/snmlabs/snm001/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/snmlabs/snm001/labels{/name}","releases_url":"https://api.github.com/repos/snmlabs/snm001/releases{/id}","deployments_url":"https://api.github.com/repos/snmlabs/snm001/deployments","created_at":"2018-09-15T04:11:37Z","updated_at":"2018-09-20T17:49:09Z","pushed_at":"2018-09-22T02:06:18Z","git_url":"git://github.com/snmlabs/snm001.git","ssh_url":"git@github.com:snmlabs/snm001.git","clone_url":"https://github.com/snmlabs/snm001.git","svn_url":"https://github.com/snmlabs/snm001","homepage":null,"size":162,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"snmlabs:master","ref":"master","sha":"1e2b4e8dfe8a7cb7c3097adf191292b465950144","user":{"login":"snmlabs","id":43287455,"node_id":"MDQ6VXNlcjQzMjg3NDU1","avatar_url":"https://avatars2.githubusercontent.com/u/43287455?v=4","gravatar_id":"","url":"https://api.github.com/users/snmlabs","html_url":"https://github.com/snmlabs","followers_url":"https://api.github.com/users/snmlabs/followers","following_url":"https://api.github.com/users/snmlabs/following{/other_user}","gists_url":"https://api.github.com/users/snmlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/snmlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snmlabs/subscriptions","organizations_url":"https://api.github.com/users/snmlabs/orgs","repos_url":"https://api.github.com/users/snmlabs/repos","events_url":"https://api.github.com/users/snmlabs/events{/privacy}","received_events_url":"https://api.github.com/users/snmlabs/received_events","type":"User","site_admin":false},"repo":{"id":148868408,"node_id":"MDEwOlJlcG9zaXRvcnkxNDg4Njg0MDg=","name":"snm001","full_name":"snmlabs/snm001","private":false,"owner":{"login":"snmlabs","id":43287455,"node_id":"MDQ6VXNlcjQzMjg3NDU1","avatar_url":"https://avatars2.githubusercontent.com/u/43287455?v=4","gravatar_id":"","url":"https://api.github.com/users/snmlabs","html_url":"https://github.com/snmlabs","followers_url":"https://api.github.com/users/snmlabs/followers","following_url":"https://api.github.com/users/snmlabs/following{/other_user}","gists_url":"https://api.github.com/users/snmlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/snmlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snmlabs/subscriptions","organizations_url":"https://api.github.com/users/snmlabs/orgs","repos_url":"https://api.github.com/users/snmlabs/repos","events_url":"https://api.github.com/users/snmlabs/events{/privacy}","received_events_url":"https://api.github.com/users/snmlabs/received_events","type":"User","site_admin":false},"html_url":"https://github.com/snmlabs/snm001","description":"An android music player prototype","fork":false,"url":"https://api.github.com/repos/snmlabs/snm001","forks_url":"https://api.github.com/repos/snmlabs/snm001/forks","keys_url":"https://api.github.com/repos/snmlabs/snm001/keys{/key_id}","collaborators_url":"https://api.github.com/repos/snmlabs/snm001/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/snmlabs/snm001/teams","hooks_url":"https://api.github.com/repos/snmlabs/snm001/hooks","issue_events_url":"https://api.github.com/repos/snmlabs/snm001/issues/events{/number}","events_url":"https://api.github.com/repos/snmlabs/snm001/events","assignees_url":"https://api.github.com/repos/snmlabs/snm001/assignees{/user}","branches_url":"https://api.github.com/repos/snmlabs/snm001/branches{/branch}","tags_url":"https://api.github.com/repos/snmlabs/snm001/tags","blobs_url":"https://api.github.com/repos/snmlabs/snm001/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/snmlabs/snm001/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/snmlabs/snm001/git/refs{/sha}","trees_url":"https://api.github.com/repos/snmlabs/snm001/git/trees{/sha}","statuses_url":"https://api.github.com/repos/snmlabs/snm001/statuses/{sha}","languages_url":"https://api.github.com/repos/snmlabs/snm001/languages","stargazers_url":"https://api.github.com/repos/snmlabs/snm001/stargazers","contributors_url":"https://api.github.com/repos/snmlabs/snm001/contributors","subscribers_url":"https://api.github.com/repos/snmlabs/snm001/subscribers","subscription_url":"https://api.github.com/repos/snmlabs/snm001/subscription","commits_url":"https://api.github.com/repos/snmlabs/snm001/commits{/sha}","git_commits_url":"https://api.github.com/repos/snmlabs/snm001/git/commits{/sha}","comments_url":"https://api.github.com/repos/snmlabs/snm001/comments{/number}","issue_comment_url":"https://api.github.com/repos/snmlabs/snm001/issues/comments{/number}","contents_url":"https://api.github.com/repos/snmlabs/snm001/contents/{+path}","compare_url":"https://api.github.com/repos/snmlabs/snm001/compare/{base}...{head}","merges_url":"https://api.github.com/repos/snmlabs/snm001/merges","archive_url":"https://api.github.com/repos/snmlabs/snm001/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/snmlabs/snm001/downloads","issues_url":"https://api.github.com/repos/snmlabs/snm001/issues{/number}","pulls_url":"https://api.github.com/repos/snmlabs/snm001/pulls{/number}","milestones_url":"https://api.github.com/repos/snmlabs/snm001/milestones{/number}","notifications_url":"https://api.github.com/repos/snmlabs/snm001/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/snmlabs/snm001/labels{/name}","releases_url":"https://api.github.com/repos/snmlabs/snm001/releases{/id}","deployments_url":"https://api.github.com/repos/snmlabs/snm001/deployments","created_at":"2018-09-15T04:11:37Z","updated_at":"2018-09-20T17:49:09Z","pushed_at":"2018-09-22T02:06:18Z","git_url":"git://github.com/snmlabs/snm001.git","ssh_url":"git@github.com:snmlabs/snm001.git","clone_url":"https://github.com/snmlabs/snm001.git","svn_url":"https://github.com/snmlabs/snm001","homepage":null,"size":162,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/snmlabs/snm001/pulls/3"},"html":{"href":"https://github.com/snmlabs/snm001/pull/3"},"issue":{"href":"https://api.github.com/repos/snmlabs/snm001/issues/3"},"comments":{"href":"https://api.github.com/repos/snmlabs/snm001/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/snmlabs/snm001/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/snmlabs/snm001/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/snmlabs/snm001/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/snmlabs/snm001/statuses/fba389b4b45c9596aaaa0833c06264c9dcffa932"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"snmlabs"}}