{"action":"created","comment":{"url":"https://api.github.com/repos/Austry/content-provider/pulls/comments/74316025","id":74316025,"diff_hunk":"@@ -0,0 +1,234 @@\n+package com.austry.content_provider.db;\n+\n+import android.content.ContentValues;\n+import android.content.Context;\n+import android.database.Cursor;\n+import android.database.sqlite.SQLiteDatabase;\n+import android.database.sqlite.SQLiteQueryBuilder;\n+import android.support.annotation.Nullable;\n+import android.support.annotation.VisibleForTesting;\n+\n+import com.austry.content_provider.db.contracts.ArtistContract;\n+import com.austry.content_provider.db.contracts.ArtistGenreContract;\n+import com.austry.content_provider.db.contracts.CoverContract;\n+import com.austry.content_provider.db.contracts.GenreContract;\n+import com.austry.content_provider.model.Artist;\n+import com.austry.content_provider.model.Cover;\n+import com.austry.content_provider.provider.ArtistsProviderContract;\n+\n+import java.util.ArrayList;\n+import java.util.LinkedList;\n+import java.util.List;\n+\n+import static com.austry.content_provider.db.DbUtils.addTablePrefix;\n+import static com.austry.content_provider.db.DbUtils.getResultLongAndClose;\n+\n+public class DbBackend {\n+    private static final String TAG = \"DbBackend\";\n+\n+    private static final String ALL_ARTISTS_TABLES = ArtistContract.TABLE_NAME +\n+            \" JOIN \" + CoverContract.TABLE_NAME + \" ON \" +","path":"app/src/main/java/com/austry/content_provider/db/DbBackend.java","position":30,"original_position":30,"commit_id":"8059c599a2155905aefc9dfe81c78f19350a6933","original_commit_id":"8059c599a2155905aefc9dfe81c78f19350a6933","user":{"login":"matreshkin","id":5363053,"avatar_url":"https://avatars.githubusercontent.com/u/5363053?v=3","gravatar_id":"","url":"https://api.github.com/users/matreshkin","html_url":"https://github.com/matreshkin","followers_url":"https://api.github.com/users/matreshkin/followers","following_url":"https://api.github.com/users/matreshkin/following{/other_user}","gists_url":"https://api.github.com/users/matreshkin/gists{/gist_id}","starred_url":"https://api.github.com/users/matreshkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matreshkin/subscriptions","organizations_url":"https://api.github.com/users/matreshkin/orgs","repos_url":"https://api.github.com/users/matreshkin/repos","events_url":"https://api.github.com/users/matreshkin/events{/privacy}","received_events_url":"https://api.github.com/users/matreshkin/received_events","type":"User","site_admin":false},"body":"Посмотри, мне кажется, что если попадет, то с непонятным жанром.","created_at":"2016-08-10T19:43:53Z","updated_at":"2016-08-10T19:43:53Z","html_url":"https://github.com/Austry/content-provider/pull/1#discussion_r74316025","pull_request_url":"https://api.github.com/repos/Austry/content-provider/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/Austry/content-provider/pulls/comments/74316025"},"html":{"href":"https://github.com/Austry/content-provider/pull/1#discussion_r74316025"},"pull_request":{"href":"https://api.github.com/repos/Austry/content-provider/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/Austry/content-provider/pulls/1","id":80454596,"html_url":"https://github.com/Austry/content-provider/pull/1","diff_url":"https://github.com/Austry/content-provider/pull/1.diff","patch_url":"https://github.com/Austry/content-provider/pull/1.patch","issue_url":"https://api.github.com/repos/Austry/content-provider/issues/1","number":1,"state":"open","locked":false,"title":"Demo","user":{"login":"Austry","id":3954654,"avatar_url":"https://avatars.githubusercontent.com/u/3954654?v=3","gravatar_id":"","url":"https://api.github.com/users/Austry","html_url":"https://github.com/Austry","followers_url":"https://api.github.com/users/Austry/followers","following_url":"https://api.github.com/users/Austry/following{/other_user}","gists_url":"https://api.github.com/users/Austry/gists{/gist_id}","starred_url":"https://api.github.com/users/Austry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Austry/subscriptions","organizations_url":"https://api.github.com/users/Austry/orgs","repos_url":"https://api.github.com/users/Austry/repos","events_url":"https://api.github.com/users/Austry/events{/privacy}","received_events_url":"https://api.github.com/users/Austry/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-08-08T13:52:48Z","updated_at":"2016-08-10T19:43:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b7d415e98746ba298b4e7bbeb9e6c5f115301f7b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Austry/content-provider/pulls/1/commits","review_comments_url":"https://api.github.com/repos/Austry/content-provider/pulls/1/comments","review_comment_url":"https://api.github.com/repos/Austry/content-provider/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Austry/content-provider/issues/1/comments","statuses_url":"https://api.github.com/repos/Austry/content-provider/statuses/8059c599a2155905aefc9dfe81c78f19350a6933","head":{"label":"Austry:demo","ref":"demo","sha":"8059c599a2155905aefc9dfe81c78f19350a6933","user":{"login":"Austry","id":3954654,"avatar_url":"https://avatars.githubusercontent.com/u/3954654?v=3","gravatar_id":"","url":"https://api.github.com/users/Austry","html_url":"https://github.com/Austry","followers_url":"https://api.github.com/users/Austry/followers","following_url":"https://api.github.com/users/Austry/following{/other_user}","gists_url":"https://api.github.com/users/Austry/gists{/gist_id}","starred_url":"https://api.github.com/users/Austry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Austry/subscriptions","organizations_url":"https://api.github.com/users/Austry/orgs","repos_url":"https://api.github.com/users/Austry/repos","events_url":"https://api.github.com/users/Austry/events{/privacy}","received_events_url":"https://api.github.com/users/Austry/received_events","type":"User","site_admin":false},"repo":{"id":65205536,"name":"content-provider","full_name":"Austry/content-provider","owner":{"login":"Austry","id":3954654,"avatar_url":"https://avatars.githubusercontent.com/u/3954654?v=3","gravatar_id":"","url":"https://api.github.com/users/Austry","html_url":"https://github.com/Austry","followers_url":"https://api.github.com/users/Austry/followers","following_url":"https://api.github.com/users/Austry/following{/other_user}","gists_url":"https://api.github.com/users/Austry/gists{/gist_id}","starred_url":"https://api.github.com/users/Austry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Austry/subscriptions","organizations_url":"https://api.github.com/users/Austry/orgs","repos_url":"https://api.github.com/users/Austry/repos","events_url":"https://api.github.com/users/Austry/events{/privacy}","received_events_url":"https://api.github.com/users/Austry/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Austry/content-provider","description":null,"fork":false,"url":"https://api.github.com/repos/Austry/content-provider","forks_url":"https://api.github.com/repos/Austry/content-provider/forks","keys_url":"https://api.github.com/repos/Austry/content-provider/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Austry/content-provider/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Austry/content-provider/teams","hooks_url":"https://api.github.com/repos/Austry/content-provider/hooks","issue_events_url":"https://api.github.com/repos/Austry/content-provider/issues/events{/number}","events_url":"https://api.github.com/repos/Austry/content-provider/events","assignees_url":"https://api.github.com/repos/Austry/content-provider/assignees{/user}","branches_url":"https://api.github.com/repos/Austry/content-provider/branches{/branch}","tags_url":"https://api.github.com/repos/Austry/content-provider/tags","blobs_url":"https://api.github.com/repos/Austry/content-provider/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Austry/content-provider/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Austry/content-provider/git/refs{/sha}","trees_url":"https://api.github.com/repos/Austry/content-provider/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Austry/content-provider/statuses/{sha}","languages_url":"https://api.github.com/repos/Austry/content-provider/languages","stargazers_url":"https://api.github.com/repos/Austry/content-provider/stargazers","contributors_url":"https://api.github.com/repos/Austry/content-provider/contributors","subscribers_url":"https://api.github.com/repos/Austry/content-provider/subscribers","subscription_url":"https://api.github.com/repos/Austry/content-provider/subscription","commits_url":"https://api.github.com/repos/Austry/content-provider/commits{/sha}","git_commits_url":"https://api.github.com/repos/Austry/content-provider/git/commits{/sha}","comments_url":"https://api.github.com/repos/Austry/content-provider/comments{/number}","issue_comment_url":"https://api.github.com/repos/Austry/content-provider/issues/comments{/number}","contents_url":"https://api.github.com/repos/Austry/content-provider/contents/{+path}","compare_url":"https://api.github.com/repos/Austry/content-provider/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Austry/content-provider/merges","archive_url":"https://api.github.com/repos/Austry/content-provider/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Austry/content-provider/downloads","issues_url":"https://api.github.com/repos/Austry/content-provider/issues{/number}","pulls_url":"https://api.github.com/repos/Austry/content-provider/pulls{/number}","milestones_url":"https://api.github.com/repos/Austry/content-provider/milestones{/number}","notifications_url":"https://api.github.com/repos/Austry/content-provider/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Austry/content-provider/labels{/name}","releases_url":"https://api.github.com/repos/Austry/content-provider/releases{/id}","deployments_url":"https://api.github.com/repos/Austry/content-provider/deployments","created_at":"2016-08-08T13:15:39Z","updated_at":"2016-08-08T13:15:57Z","pushed_at":"2016-08-10T15:08:23Z","git_url":"git://github.com/Austry/content-provider.git","ssh_url":"git@github.com:Austry/content-provider.git","clone_url":"https://github.com/Austry/content-provider.git","svn_url":"https://github.com/Austry/content-provider","homepage":null,"size":168,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"Austry:demo2","ref":"demo2","sha":"ee9ff78f13a8f8a959958de0ddbbc1a74dbc6dd3","user":{"login":"Austry","id":3954654,"avatar_url":"https://avatars.githubusercontent.com/u/3954654?v=3","gravatar_id":"","url":"https://api.github.com/users/Austry","html_url":"https://github.com/Austry","followers_url":"https://api.github.com/users/Austry/followers","following_url":"https://api.github.com/users/Austry/following{/other_user}","gists_url":"https://api.github.com/users/Austry/gists{/gist_id}","starred_url":"https://api.github.com/users/Austry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Austry/subscriptions","organizations_url":"https://api.github.com/users/Austry/orgs","repos_url":"https://api.github.com/users/Austry/repos","events_url":"https://api.github.com/users/Austry/events{/privacy}","received_events_url":"https://api.github.com/users/Austry/received_events","type":"User","site_admin":false},"repo":{"id":65205536,"name":"content-provider","full_name":"Austry/content-provider","owner":{"login":"Austry","id":3954654,"avatar_url":"https://avatars.githubusercontent.com/u/3954654?v=3","gravatar_id":"","url":"https://api.github.com/users/Austry","html_url":"https://github.com/Austry","followers_url":"https://api.github.com/users/Austry/followers","following_url":"https://api.github.com/users/Austry/following{/other_user}","gists_url":"https://api.github.com/users/Austry/gists{/gist_id}","starred_url":"https://api.github.com/users/Austry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Austry/subscriptions","organizations_url":"https://api.github.com/users/Austry/orgs","repos_url":"https://api.github.com/users/Austry/repos","events_url":"https://api.github.com/users/Austry/events{/privacy}","received_events_url":"https://api.github.com/users/Austry/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Austry/content-provider","description":null,"fork":false,"url":"https://api.github.com/repos/Austry/content-provider","forks_url":"https://api.github.com/repos/Austry/content-provider/forks","keys_url":"https://api.github.com/repos/Austry/content-provider/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Austry/content-provider/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Austry/content-provider/teams","hooks_url":"https://api.github.com/repos/Austry/content-provider/hooks","issue_events_url":"https://api.github.com/repos/Austry/content-provider/issues/events{/number}","events_url":"https://api.github.com/repos/Austry/content-provider/events","assignees_url":"https://api.github.com/repos/Austry/content-provider/assignees{/user}","branches_url":"https://api.github.com/repos/Austry/content-provider/branches{/branch}","tags_url":"https://api.github.com/repos/Austry/content-provider/tags","blobs_url":"https://api.github.com/repos/Austry/content-provider/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Austry/content-provider/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Austry/content-provider/git/refs{/sha}","trees_url":"https://api.github.com/repos/Austry/content-provider/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Austry/content-provider/statuses/{sha}","languages_url":"https://api.github.com/repos/Austry/content-provider/languages","stargazers_url":"https://api.github.com/repos/Austry/content-provider/stargazers","contributors_url":"https://api.github.com/repos/Austry/content-provider/contributors","subscribers_url":"https://api.github.com/repos/Austry/content-provider/subscribers","subscription_url":"https://api.github.com/repos/Austry/content-provider/subscription","commits_url":"https://api.github.com/repos/Austry/content-provider/commits{/sha}","git_commits_url":"https://api.github.com/repos/Austry/content-provider/git/commits{/sha}","comments_url":"https://api.github.com/repos/Austry/content-provider/comments{/number}","issue_comment_url":"https://api.github.com/repos/Austry/content-provider/issues/comments{/number}","contents_url":"https://api.github.com/repos/Austry/content-provider/contents/{+path}","compare_url":"https://api.github.com/repos/Austry/content-provider/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Austry/content-provider/merges","archive_url":"https://api.github.com/repos/Austry/content-provider/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Austry/content-provider/downloads","issues_url":"https://api.github.com/repos/Austry/content-provider/issues{/number}","pulls_url":"https://api.github.com/repos/Austry/content-provider/pulls{/number}","milestones_url":"https://api.github.com/repos/Austry/content-provider/milestones{/number}","notifications_url":"https://api.github.com/repos/Austry/content-provider/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Austry/content-provider/labels{/name}","releases_url":"https://api.github.com/repos/Austry/content-provider/releases{/id}","deployments_url":"https://api.github.com/repos/Austry/content-provider/deployments","created_at":"2016-08-08T13:15:39Z","updated_at":"2016-08-08T13:15:57Z","pushed_at":"2016-08-10T15:08:23Z","git_url":"git://github.com/Austry/content-provider.git","ssh_url":"git@github.com:Austry/content-provider.git","clone_url":"https://github.com/Austry/content-provider.git","svn_url":"https://github.com/Austry/content-provider","homepage":null,"size":168,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Austry/content-provider/pulls/1"},"html":{"href":"https://github.com/Austry/content-provider/pull/1"},"issue":{"href":"https://api.github.com/repos/Austry/content-provider/issues/1"},"comments":{"href":"https://api.github.com/repos/Austry/content-provider/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/Austry/content-provider/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/Austry/content-provider/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Austry/content-provider/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/Austry/content-provider/statuses/8059c599a2155905aefc9dfe81c78f19350a6933"}}}}
{"actor":{"display_login":"matreshkin"}}