{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla-magnet/magnet-client/pulls/comments/70833026","id":70833026,"diff_hunk":"@@ -0,0 +1,192 @@\n+package org.mozilla.magnet.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.SQLiteOpenHelper;\n+import android.util.Log;\n+\n+import org.mozilla.magnet.db.Schema.HistoryEntry;\n+\n+import java.util.Date;\n+import java.util.concurrent.TimeUnit;\n+\n+import static android.provider.BaseColumns._ID;\n+import static org.mozilla.magnet.db.Schema.HistoryEntry.COLUMN_NAME_TIME_LAST_SEEN;\n+import static org.mozilla.magnet.db.Schema.HistoryEntry.COLUMN_NAME_URL;\n+import static org.mozilla.magnet.db.Schema.HistoryEntry.COLUMN_NAME_TIME_FIRST_SEEN;\n+\n+public class History extends SQLiteOpenHelper {","path":"android/app/src/main/java/org/mozilla/magnet/db/History.java","position":20,"original_position":20,"commit_id":"06e56ce38d651efd92b9a31b06d11cc68f83e24c","original_commit_id":"06e56ce38d651efd92b9a31b06d11cc68f83e24c","user":{"login":"arcturus","id":60801,"avatar_url":"https://avatars.githubusercontent.com/u/60801?v=3","gravatar_id":"","url":"https://api.github.com/users/arcturus","html_url":"https://github.com/arcturus","followers_url":"https://api.github.com/users/arcturus/followers","following_url":"https://api.github.com/users/arcturus/following{/other_user}","gists_url":"https://api.github.com/users/arcturus/gists{/gist_id}","starred_url":"https://api.github.com/users/arcturus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arcturus/subscriptions","organizations_url":"https://api.github.com/users/arcturus/orgs","repos_url":"https://api.github.com/users/arcturus/repos","events_url":"https://api.github.com/users/arcturus/events{/privacy}","received_events_url":"https://api.github.com/users/arcturus/received_events","type":"User","site_admin":false},"body":"Yeah, I would call it HistorySQLite, so if we realise that we need to replace SQLite by ... XYZ, we just replace the HistoryXYZ object that implements the logic.\r\n\r\nBut we keep the high level semantics of History, the want that we want to be used by other classes.","created_at":"2016-07-14T16:02:39Z","updated_at":"2016-07-14T16:02:39Z","html_url":"https://github.com/mozilla-magnet/magnet-client/pull/188#discussion_r70833026","pull_request_url":"https://api.github.com/repos/mozilla-magnet/magnet-client/pulls/188","_links":{"self":{"href":"https://api.github.com/repos/mozilla-magnet/magnet-client/pulls/comments/70833026"},"html":{"href":"https://github.com/mozilla-magnet/magnet-client/pull/188#discussion_r70833026"},"pull_request":{"href":"https://api.github.com/repos/mozilla-magnet/magnet-client/pulls/188"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla-magnet/magnet-client/pulls/188","id":77456695,"html_url":"https://github.com/mozilla-magnet/magnet-client/pull/188","diff_url":"https://github.com/mozilla-magnet/magnet-client/pull/188.diff","patch_url":"https://github.com/mozilla-magnet/magnet-client/pull/188.patch","issue_url":"https://api.github.com/repos/mozilla-magnet/magnet-client/issues/188","number":188,"state":"open","locked":false,"title":"Started recording URL detections in local History DB (closes #184)","user":{"login":"wilsonpage","id":1020551,"avatar_url":"https://avatars.githubusercontent.com/u/1020551?v=3","gravatar_id":"","url":"https://api.github.com/users/wilsonpage","html_url":"https://github.com/wilsonpage","followers_url":"https://api.github.com/users/wilsonpage/followers","following_url":"https://api.github.com/users/wilsonpage/following{/other_user}","gists_url":"https://api.github.com/users/wilsonpage/gists{/gist_id}","starred_url":"https://api.github.com/users/wilsonpage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilsonpage/subscriptions","organizations_url":"https://api.github.com/users/wilsonpage/orgs","repos_url":"https://api.github.com/users/wilsonpage/repos","events_url":"https://api.github.com/users/wilsonpage/events{/privacy}","received_events_url":"https://api.github.com/users/wilsonpage/received_events","type":"User","site_admin":false},"body":null,"created_at":"2016-07-14T13:33:53Z","updated_at":"2016-07-14T16:02:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"398928b95fad4f8ab8726d863862cedf63424733","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mozilla-magnet/magnet-client/pulls/188/commits","review_comments_url":"https://api.github.com/repos/mozilla-magnet/magnet-client/pulls/188/comments","review_comment_url":"https://api.github.com/repos/mozilla-magnet/magnet-client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla-magnet/magnet-client/issues/188/comments","statuses_url":"https://api.github.com/repos/mozilla-magnet/magnet-client/statuses/06e56ce38d651efd92b9a31b06d11cc68f83e24c","head":{"label":"wilsonpage:184-history-db-android","ref":"184-history-db-android","sha":"06e56ce38d651efd92b9a31b06d11cc68f83e24c","user":{"login":"wilsonpage","id":1020551,"avatar_url":"https://avatars.githubusercontent.com/u/1020551?v=3","gravatar_id":"","url":"https://api.github.com/users/wilsonpage","html_url":"https://github.com/wilsonpage","followers_url":"https://api.github.com/users/wilsonpage/followers","following_url":"https://api.github.com/users/wilsonpage/following{/other_user}","gists_url":"https://api.github.com/users/wilsonpage/gists{/gist_id}","starred_url":"https://api.github.com/users/wilsonpage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilsonpage/subscriptions","organizations_url":"https://api.github.com/users/wilsonpage/orgs","repos_url":"https://api.github.com/users/wilsonpage/repos","events_url":"https://api.github.com/users/wilsonpage/events{/privacy}","received_events_url":"https://api.github.com/users/wilsonpage/received_events","type":"User","site_admin":false},"repo":{"id":56323623,"name":"magnet-client","full_name":"wilsonpage/magnet-client","owner":{"login":"wilsonpage","id":1020551,"avatar_url":"https://avatars.githubusercontent.com/u/1020551?v=3","gravatar_id":"","url":"https://api.github.com/users/wilsonpage","html_url":"https://github.com/wilsonpage","followers_url":"https://api.github.com/users/wilsonpage/followers","following_url":"https://api.github.com/users/wilsonpage/following{/other_user}","gists_url":"https://api.github.com/users/wilsonpage/gists{/gist_id}","starred_url":"https://api.github.com/users/wilsonpage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilsonpage/subscriptions","organizations_url":"https://api.github.com/users/wilsonpage/orgs","repos_url":"https://api.github.com/users/wilsonpage/repos","events_url":"https://api.github.com/users/wilsonpage/events{/privacy}","received_events_url":"https://api.github.com/users/wilsonpage/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wilsonpage/magnet-client","description":"","fork":true,"url":"https://api.github.com/repos/wilsonpage/magnet-client","forks_url":"https://api.github.com/repos/wilsonpage/magnet-client/forks","keys_url":"https://api.github.com/repos/wilsonpage/magnet-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wilsonpage/magnet-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wilsonpage/magnet-client/teams","hooks_url":"https://api.github.com/repos/wilsonpage/magnet-client/hooks","issue_events_url":"https://api.github.com/repos/wilsonpage/magnet-client/issues/events{/number}","events_url":"https://api.github.com/repos/wilsonpage/magnet-client/events","assignees_url":"https://api.github.com/repos/wilsonpage/magnet-client/assignees{/user}","branches_url":"https://api.github.com/repos/wilsonpage/magnet-client/branches{/branch}","tags_url":"https://api.github.com/repos/wilsonpage/magnet-client/tags","blobs_url":"https://api.github.com/repos/wilsonpage/magnet-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wilsonpage/magnet-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wilsonpage/magnet-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/wilsonpage/magnet-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wilsonpage/magnet-client/statuses/{sha}","languages_url":"https://api.github.com/repos/wilsonpage/magnet-client/languages","stargazers_url":"https://api.github.com/repos/wilsonpage/magnet-client/stargazers","contributors_url":"https://api.github.com/repos/wilsonpage/magnet-client/contributors","subscribers_url":"https://api.github.com/repos/wilsonpage/magnet-client/subscribers","subscription_url":"https://api.github.com/repos/wilsonpage/magnet-client/subscription","commits_url":"https://api.github.com/repos/wilsonpage/magnet-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/wilsonpage/magnet-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/wilsonpage/magnet-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/wilsonpage/magnet-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/wilsonpage/magnet-client/contents/{+path}","compare_url":"https://api.github.com/repos/wilsonpage/magnet-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wilsonpage/magnet-client/merges","archive_url":"https://api.github.com/repos/wilsonpage/magnet-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wilsonpage/magnet-client/downloads","issues_url":"https://api.github.com/repos/wilsonpage/magnet-client/issues{/number}","pulls_url":"https://api.github.com/repos/wilsonpage/magnet-client/pulls{/number}","milestones_url":"https://api.github.com/repos/wilsonpage/magnet-client/milestones{/number}","notifications_url":"https://api.github.com/repos/wilsonpage/magnet-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wilsonpage/magnet-client/labels{/name}","releases_url":"https://api.github.com/repos/wilsonpage/magnet-client/releases{/id}","deployments_url":"https://api.github.com/repos/wilsonpage/magnet-client/deployments","created_at":"2016-04-15T13:50:36Z","updated_at":"2016-05-11T10:38:07Z","pushed_at":"2016-07-14T14:16:51Z","git_url":"git://github.com/wilsonpage/magnet-client.git","ssh_url":"git@github.com:wilsonpage/magnet-client.git","clone_url":"https://github.com/wilsonpage/magnet-client.git","svn_url":"https://github.com/wilsonpage/magnet-client","homepage":null,"size":44277,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla-magnet:master","ref":"master","sha":"887b0815a1203722792ff4aae671a71c32b711eb","user":{"login":"mozilla-magnet","id":17905978,"avatar_url":"https://avatars.githubusercontent.com/u/17905978?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-magnet","html_url":"https://github.com/mozilla-magnet","followers_url":"https://api.github.com/users/mozilla-magnet/followers","following_url":"https://api.github.com/users/mozilla-magnet/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-magnet/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-magnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-magnet/subscriptions","organizations_url":"https://api.github.com/users/mozilla-magnet/orgs","repos_url":"https://api.github.com/users/mozilla-magnet/repos","events_url":"https://api.github.com/users/mozilla-magnet/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-magnet/received_events","type":"Organization","site_admin":false},"repo":{"id":50177593,"name":"magnet-client","full_name":"mozilla-magnet/magnet-client","owner":{"login":"mozilla-magnet","id":17905978,"avatar_url":"https://avatars.githubusercontent.com/u/17905978?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-magnet","html_url":"https://github.com/mozilla-magnet","followers_url":"https://api.github.com/users/mozilla-magnet/followers","following_url":"https://api.github.com/users/mozilla-magnet/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-magnet/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-magnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-magnet/subscriptions","organizations_url":"https://api.github.com/users/mozilla-magnet/orgs","repos_url":"https://api.github.com/users/mozilla-magnet/repos","events_url":"https://api.github.com/users/mozilla-magnet/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-magnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla-magnet/magnet-client","description":"A nearby content discovery client for Android & iOS","fork":false,"url":"https://api.github.com/repos/mozilla-magnet/magnet-client","forks_url":"https://api.github.com/repos/mozilla-magnet/magnet-client/forks","keys_url":"https://api.github.com/repos/mozilla-magnet/magnet-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-magnet/magnet-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-magnet/magnet-client/teams","hooks_url":"https://api.github.com/repos/mozilla-magnet/magnet-client/hooks","issue_events_url":"https://api.github.com/repos/mozilla-magnet/magnet-client/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-magnet/magnet-client/events","assignees_url":"https://api.github.com/repos/mozilla-magnet/magnet-client/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-magnet/magnet-client/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-magnet/magnet-client/tags","blobs_url":"https://api.github.com/repos/mozilla-magnet/magnet-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-magnet/magnet-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-magnet/magnet-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-magnet/magnet-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-magnet/magnet-client/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-magnet/magnet-client/languages","stargazers_url":"https://api.github.com/repos/mozilla-magnet/magnet-client/stargazers","contributors_url":"https://api.github.com/repos/mozilla-magnet/magnet-client/contributors","subscribers_url":"https://api.github.com/repos/mozilla-magnet/magnet-client/subscribers","subscription_url":"https://api.github.com/repos/mozilla-magnet/magnet-client/subscription","commits_url":"https://api.github.com/repos/mozilla-magnet/magnet-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-magnet/magnet-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-magnet/magnet-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-magnet/magnet-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla-magnet/magnet-client/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-magnet/magnet-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-magnet/magnet-client/merges","archive_url":"https://api.github.com/repos/mozilla-magnet/magnet-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-magnet/magnet-client/downloads","issues_url":"https://api.github.com/repos/mozilla-magnet/magnet-client/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-magnet/magnet-client/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-magnet/magnet-client/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-magnet/magnet-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-magnet/magnet-client/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-magnet/magnet-client/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla-magnet/magnet-client/deployments","created_at":"2016-01-22T11:32:12Z","updated_at":"2016-06-16T14:51:20Z","pushed_at":"2016-07-14T14:18:36Z","git_url":"git://github.com/mozilla-magnet/magnet-client.git","ssh_url":"git@github.com:mozilla-magnet/magnet-client.git","clone_url":"https://github.com/mozilla-magnet/magnet-client.git","svn_url":"https://github.com/mozilla-magnet/magnet-client","homepage":"","size":45792,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":56,"forks":6,"open_issues":56,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla-magnet/magnet-client/pulls/188"},"html":{"href":"https://github.com/mozilla-magnet/magnet-client/pull/188"},"issue":{"href":"https://api.github.com/repos/mozilla-magnet/magnet-client/issues/188"},"comments":{"href":"https://api.github.com/repos/mozilla-magnet/magnet-client/issues/188/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla-magnet/magnet-client/pulls/188/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla-magnet/magnet-client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla-magnet/magnet-client/pulls/188/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla-magnet/magnet-client/statuses/06e56ce38d651efd92b9a31b06d11cc68f83e24c"}}}}
{"actor":{"display_login":"arcturus"}}