{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/pulls/comments/81456709","pull_request_review_id":2437392,"id":81456709,"diff_hunk":"@@ -35,4 +45,21 @@ public class SQLiteBookmarks: BookmarksModelFactorySource {\n         \n         return self.db.queryReturnsResults(sql, args: args)\n     }\n+\n+    public func getURLForKeywordSearch(keyword: String) -> Deferred<Maybe<String>> {\n+        let sql = \"SELECT bmkUri FROM \\(TableBookmarksBuffer) WHERE \" +","path":"Storage/SQL/SQLiteBookmarksBase.swift","position":25,"original_position":25,"commit_id":"006e489ee614b7aeb1e19fe53b630d21e7eb6219","original_commit_id":"006e489ee614b7aeb1e19fe53b630d21e7eb6219","user":{"login":"rnewman","id":91722,"avatar_url":"https://avatars.githubusercontent.com/u/91722?v=3","gravatar_id":"","url":"https://api.github.com/users/rnewman","html_url":"https://github.com/rnewman","followers_url":"https://api.github.com/users/rnewman/followers","following_url":"https://api.github.com/users/rnewman/following{/other_user}","gists_url":"https://api.github.com/users/rnewman/gists{/gist_id}","starred_url":"https://api.github.com/users/rnewman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rnewman/subscriptions","organizations_url":"https://api.github.com/users/rnewman/orgs","repos_url":"https://api.github.com/users/rnewman/repos","events_url":"https://api.github.com/users/rnewman/events{/privacy}","received_events_url":"https://api.github.com/users/rnewman/received_events","type":"User","site_admin":false},"body":"I don't think querying the buffer is the correct choice here.\r\n\r\nThe buffer will — as soon as bidirectional syncing is enabled — be empty. That this code works now is almost an accident!\r\n\r\nBecause we don't allow you to edit bookmarks locally, or add keywords to them locally, an acceptable short-term solution here is to query the overlay of remote bookmarks on top of merged bookmarks (`ViewBoomarksBufferOnMirror`). A longer-term solution is to query everything: use `ViewAllBookmarks`.\r\n\r\nThose views don't pass through `keyword` (because we haven't used it so far), so you will need a small database migration to do what you need. Ask @sleroux for help with that.","created_at":"2016-10-01T19:22:12Z","updated_at":"2016-10-01T19:23:48Z","html_url":"https://github.com/mozilla-mobile/firefox-ios/pull/2123#discussion_r81456709","pull_request_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/pulls/2123","_links":{"self":{"href":"https://api.github.com/repos/mozilla-mobile/firefox-ios/pulls/comments/81456709"},"html":{"href":"https://github.com/mozilla-mobile/firefox-ios/pull/2123#discussion_r81456709"},"pull_request":{"href":"https://api.github.com/repos/mozilla-mobile/firefox-ios/pulls/2123"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/pulls/2123","id":86751842,"html_url":"https://github.com/mozilla-mobile/firefox-ios/pull/2123","diff_url":"https://github.com/mozilla-mobile/firefox-ios/pull/2123.diff","patch_url":"https://github.com/mozilla-mobile/firefox-ios/pull/2123.patch","issue_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/issues/2123","number":2123,"state":"open","locked":false,"title":"Bug 1253656 - Enable bookmark keyword searching","user":{"login":"mauryat","id":9949800,"avatar_url":"https://avatars.githubusercontent.com/u/9949800?v=3","gravatar_id":"","url":"https://api.github.com/users/mauryat","html_url":"https://github.com/mauryat","followers_url":"https://api.github.com/users/mauryat/followers","following_url":"https://api.github.com/users/mauryat/following{/other_user}","gists_url":"https://api.github.com/users/mauryat/gists{/gist_id}","starred_url":"https://api.github.com/users/mauryat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mauryat/subscriptions","organizations_url":"https://api.github.com/users/mauryat/orgs","repos_url":"https://api.github.com/users/mauryat/repos","events_url":"https://api.github.com/users/mauryat/events{/privacy}","received_events_url":"https://api.github.com/users/mauryat/received_events","type":"User","site_admin":false},"body":"@thebnich let me know if you have any feedback! \r\n\r\nMy main concern is:\r\nWhat happens if the user submits a keyword search query. Even before the database request gets completed, it is possible that the user might edit the url bar text and resubmit.","created_at":"2016-09-26T14:21:19Z","updated_at":"2016-10-01T19:23:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dbb5c9e8b3d503ce9f7ea463b913689622f6a0f6","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/pulls/2123/commits","review_comments_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/pulls/2123/comments","review_comment_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/issues/2123/comments","statuses_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/statuses/006e489ee614b7aeb1e19fe53b630d21e7eb6219","head":{"label":"mauryat:Bug-1253656-enable-bookmark-keyword-searching","ref":"Bug-1253656-enable-bookmark-keyword-searching","sha":"006e489ee614b7aeb1e19fe53b630d21e7eb6219","user":{"login":"mauryat","id":9949800,"avatar_url":"https://avatars.githubusercontent.com/u/9949800?v=3","gravatar_id":"","url":"https://api.github.com/users/mauryat","html_url":"https://github.com/mauryat","followers_url":"https://api.github.com/users/mauryat/followers","following_url":"https://api.github.com/users/mauryat/following{/other_user}","gists_url":"https://api.github.com/users/mauryat/gists{/gist_id}","starred_url":"https://api.github.com/users/mauryat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mauryat/subscriptions","organizations_url":"https://api.github.com/users/mauryat/orgs","repos_url":"https://api.github.com/users/mauryat/repos","events_url":"https://api.github.com/users/mauryat/events{/privacy}","received_events_url":"https://api.github.com/users/mauryat/received_events","type":"User","site_admin":false},"repo":{"id":57440044,"name":"firefox-ios","full_name":"mauryat/firefox-ios","owner":{"login":"mauryat","id":9949800,"avatar_url":"https://avatars.githubusercontent.com/u/9949800?v=3","gravatar_id":"","url":"https://api.github.com/users/mauryat","html_url":"https://github.com/mauryat","followers_url":"https://api.github.com/users/mauryat/followers","following_url":"https://api.github.com/users/mauryat/following{/other_user}","gists_url":"https://api.github.com/users/mauryat/gists{/gist_id}","starred_url":"https://api.github.com/users/mauryat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mauryat/subscriptions","organizations_url":"https://api.github.com/users/mauryat/orgs","repos_url":"https://api.github.com/users/mauryat/repos","events_url":"https://api.github.com/users/mauryat/events{/privacy}","received_events_url":"https://api.github.com/users/mauryat/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mauryat/firefox-ios","description":"Firefox for iOS","fork":true,"url":"https://api.github.com/repos/mauryat/firefox-ios","forks_url":"https://api.github.com/repos/mauryat/firefox-ios/forks","keys_url":"https://api.github.com/repos/mauryat/firefox-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mauryat/firefox-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mauryat/firefox-ios/teams","hooks_url":"https://api.github.com/repos/mauryat/firefox-ios/hooks","issue_events_url":"https://api.github.com/repos/mauryat/firefox-ios/issues/events{/number}","events_url":"https://api.github.com/repos/mauryat/firefox-ios/events","assignees_url":"https://api.github.com/repos/mauryat/firefox-ios/assignees{/user}","branches_url":"https://api.github.com/repos/mauryat/firefox-ios/branches{/branch}","tags_url":"https://api.github.com/repos/mauryat/firefox-ios/tags","blobs_url":"https://api.github.com/repos/mauryat/firefox-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mauryat/firefox-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mauryat/firefox-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/mauryat/firefox-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mauryat/firefox-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/mauryat/firefox-ios/languages","stargazers_url":"https://api.github.com/repos/mauryat/firefox-ios/stargazers","contributors_url":"https://api.github.com/repos/mauryat/firefox-ios/contributors","subscribers_url":"https://api.github.com/repos/mauryat/firefox-ios/subscribers","subscription_url":"https://api.github.com/repos/mauryat/firefox-ios/subscription","commits_url":"https://api.github.com/repos/mauryat/firefox-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/mauryat/firefox-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/mauryat/firefox-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/mauryat/firefox-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/mauryat/firefox-ios/contents/{+path}","compare_url":"https://api.github.com/repos/mauryat/firefox-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mauryat/firefox-ios/merges","archive_url":"https://api.github.com/repos/mauryat/firefox-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mauryat/firefox-ios/downloads","issues_url":"https://api.github.com/repos/mauryat/firefox-ios/issues{/number}","pulls_url":"https://api.github.com/repos/mauryat/firefox-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/mauryat/firefox-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/mauryat/firefox-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mauryat/firefox-ios/labels{/name}","releases_url":"https://api.github.com/repos/mauryat/firefox-ios/releases{/id}","deployments_url":"https://api.github.com/repos/mauryat/firefox-ios/deployments","created_at":"2016-04-30T12:01:36Z","updated_at":"2016-04-30T12:01:43Z","pushed_at":"2016-09-29T17:05:42Z","git_url":"git://github.com/mauryat/firefox-ios.git","ssh_url":"git@github.com:mauryat/firefox-ios.git","clone_url":"https://github.com/mauryat/firefox-ios.git","svn_url":"https://github.com/mauryat/firefox-ios","homepage":"","size":196027,"stargazers_count":0,"watchers_count":0,"language":"C","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-mobile:master","ref":"master","sha":"4779a27b54458edf754fcff86a265f903f3f5a43","user":{"login":"mozilla-mobile","id":22351667,"avatar_url":"https://avatars.githubusercontent.com/u/22351667?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-mobile","html_url":"https://github.com/mozilla-mobile","followers_url":"https://api.github.com/users/mozilla-mobile/followers","following_url":"https://api.github.com/users/mozilla-mobile/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-mobile/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-mobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-mobile/subscriptions","organizations_url":"https://api.github.com/users/mozilla-mobile/orgs","repos_url":"https://api.github.com/users/mozilla-mobile/repos","events_url":"https://api.github.com/users/mozilla-mobile/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-mobile/received_events","type":"Organization","site_admin":false},"repo":{"id":26133979,"name":"firefox-ios","full_name":"mozilla-mobile/firefox-ios","owner":{"login":"mozilla-mobile","id":22351667,"avatar_url":"https://avatars.githubusercontent.com/u/22351667?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-mobile","html_url":"https://github.com/mozilla-mobile","followers_url":"https://api.github.com/users/mozilla-mobile/followers","following_url":"https://api.github.com/users/mozilla-mobile/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-mobile/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-mobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-mobile/subscriptions","organizations_url":"https://api.github.com/users/mozilla-mobile/orgs","repos_url":"https://api.github.com/users/mozilla-mobile/repos","events_url":"https://api.github.com/users/mozilla-mobile/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-mobile/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla-mobile/firefox-ios","description":"Firefox for iOS","fork":false,"url":"https://api.github.com/repos/mozilla-mobile/firefox-ios","forks_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/forks","keys_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/teams","hooks_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/hooks","issue_events_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/events","assignees_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/tags","blobs_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/languages","stargazers_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/stargazers","contributors_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/contributors","subscribers_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/subscribers","subscription_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/subscription","commits_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/merges","archive_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/downloads","issues_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/deployments","created_at":"2014-11-03T19:07:02Z","updated_at":"2016-10-01T16:08:18Z","pushed_at":"2016-10-01T17:34:58Z","git_url":"git://github.com/mozilla-mobile/firefox-ios.git","ssh_url":"git@github.com:mozilla-mobile/firefox-ios.git","clone_url":"https://github.com/mozilla-mobile/firefox-ios.git","svn_url":"https://github.com/mozilla-mobile/firefox-ios","homepage":"","size":317273,"stargazers_count":6253,"watchers_count":6253,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1272,"mirror_url":null,"open_issues_count":49,"forks":1272,"open_issues":49,"watchers":6253,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla-mobile/firefox-ios/pulls/2123"},"html":{"href":"https://github.com/mozilla-mobile/firefox-ios/pull/2123"},"issue":{"href":"https://api.github.com/repos/mozilla-mobile/firefox-ios/issues/2123"},"comments":{"href":"https://api.github.com/repos/mozilla-mobile/firefox-ios/issues/2123/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla-mobile/firefox-ios/pulls/2123/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla-mobile/firefox-ios/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla-mobile/firefox-ios/pulls/2123/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla-mobile/firefox-ios/statuses/006e489ee614b7aeb1e19fe53b630d21e7eb6219"}}}}
{"actor":{"display_login":"rnewman"}}