{"action":"created","comment":{"url":"https://api.github.com/repos/coinfi/coinfi/pulls/comments/225738397","pull_request_review_id":165405478,"id":225738397,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNTczODM5Nw==","diff_hunk":"@@ -23,9 +23,17 @@ def search_by_params\n     if params[:coinSlugs].present? \n       coins = Coin.where(slug: params[:coinSlugs])\n     elsif params[:name].present?\n-      coins = Coin.where('upper(concat(symbol,\\' \\', name)) like upper(?)', \"%#{params[:name]}%\")\n-                  .order('length(name) asc')\n-                  .limit(10)\n+      coins = Coin.find_by_sql(\"","path":"app/controllers/api/coins_controller.rb","position":7,"original_position":7,"commit_id":"c5c799ffea0ddff7b6399b3053cced2c5836211e","original_commit_id":"b27a6f89cdf3d7961cfda9cacd77fb8be1d2c47f","user":{"login":"anthotsang","id":929793,"node_id":"MDQ6VXNlcjkyOTc5Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/929793?v=4","gravatar_id":"","url":"https://api.github.com/users/anthotsang","html_url":"https://github.com/anthotsang","followers_url":"https://api.github.com/users/anthotsang/followers","following_url":"https://api.github.com/users/anthotsang/following{/other_user}","gists_url":"https://api.github.com/users/anthotsang/gists{/gist_id}","starred_url":"https://api.github.com/users/anthotsang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anthotsang/subscriptions","organizations_url":"https://api.github.com/users/anthotsang/orgs","repos_url":"https://api.github.com/users/anthotsang/repos","events_url":"https://api.github.com/users/anthotsang/events{/privacy}","received_events_url":"https://api.github.com/users/anthotsang/received_events","type":"User","site_admin":false},"body":"Seems to be similar to the previous query. The EXPLAIN() for both has the same plan/costs.","created_at":"2018-10-16T23:17:46Z","updated_at":"2018-10-16T23:17:46Z","html_url":"https://github.com/coinfi/coinfi/pull/480#discussion_r225738397","pull_request_url":"https://api.github.com/repos/coinfi/coinfi/pulls/480","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/coinfi/coinfi/pulls/comments/225738397"},"html":{"href":"https://github.com/coinfi/coinfi/pull/480#discussion_r225738397"},"pull_request":{"href":"https://api.github.com/repos/coinfi/coinfi/pulls/480"}},"in_reply_to_id":225477407},"pull_request":{"url":"https://api.github.com/repos/coinfi/coinfi/pulls/480","id":223100483,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIzMTAwNDgz","html_url":"https://github.com/coinfi/coinfi/pull/480","diff_url":"https://github.com/coinfi/coinfi/pull/480.diff","patch_url":"https://github.com/coinfi/coinfi/pull/480.patch","issue_url":"https://api.github.com/repos/coinfi/coinfi/issues/480","number":480,"state":"open","locked":false,"title":"Improving the coin search bar filter logic","user":{"login":"anthotsang","id":929793,"node_id":"MDQ6VXNlcjkyOTc5Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/929793?v=4","gravatar_id":"","url":"https://api.github.com/users/anthotsang","html_url":"https://github.com/anthotsang","followers_url":"https://api.github.com/users/anthotsang/followers","following_url":"https://api.github.com/users/anthotsang/following{/other_user}","gists_url":"https://api.github.com/users/anthotsang/gists{/gist_id}","starred_url":"https://api.github.com/users/anthotsang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anthotsang/subscriptions","organizations_url":"https://api.github.com/users/anthotsang/orgs","repos_url":"https://api.github.com/users/anthotsang/repos","events_url":"https://api.github.com/users/anthotsang/events{/privacy}","received_events_url":"https://api.github.com/users/anthotsang/received_events","type":"User","site_admin":false},"body":"https://app.asana.com/0/683768070860536/854461086638935","created_at":"2018-10-16T02:59:41Z","updated_at":"2018-10-16T23:17:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"37544acabd2b656cb1649faa1f58c6fb27ed56c6","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/coinfi/coinfi/pulls/480/commits","review_comments_url":"https://api.github.com/repos/coinfi/coinfi/pulls/480/comments","review_comment_url":"https://api.github.com/repos/coinfi/coinfi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/coinfi/coinfi/issues/480/comments","statuses_url":"https://api.github.com/repos/coinfi/coinfi/statuses/c5c799ffea0ddff7b6399b3053cced2c5836211e","head":{"label":"coinfi:feature/improve-coin-search/854461086638935","ref":"feature/improve-coin-search/854461086638935","sha":"c5c799ffea0ddff7b6399b3053cced2c5836211e","user":{"login":"coinfi","id":31571310,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxNTcxMzEw","avatar_url":"https://avatars3.githubusercontent.com/u/31571310?v=4","gravatar_id":"","url":"https://api.github.com/users/coinfi","html_url":"https://github.com/coinfi","followers_url":"https://api.github.com/users/coinfi/followers","following_url":"https://api.github.com/users/coinfi/following{/other_user}","gists_url":"https://api.github.com/users/coinfi/gists{/gist_id}","starred_url":"https://api.github.com/users/coinfi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coinfi/subscriptions","organizations_url":"https://api.github.com/users/coinfi/orgs","repos_url":"https://api.github.com/users/coinfi/repos","events_url":"https://api.github.com/users/coinfi/events{/privacy}","received_events_url":"https://api.github.com/users/coinfi/received_events","type":"Organization","site_admin":false},"repo":{"id":102046959,"node_id":"MDEwOlJlcG9zaXRvcnkxMDIwNDY5NTk=","name":"coinfi","full_name":"coinfi/coinfi","private":false,"owner":{"login":"coinfi","id":31571310,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxNTcxMzEw","avatar_url":"https://avatars3.githubusercontent.com/u/31571310?v=4","gravatar_id":"","url":"https://api.github.com/users/coinfi","html_url":"https://github.com/coinfi","followers_url":"https://api.github.com/users/coinfi/followers","following_url":"https://api.github.com/users/coinfi/following{/other_user}","gists_url":"https://api.github.com/users/coinfi/gists{/gist_id}","starred_url":"https://api.github.com/users/coinfi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coinfi/subscriptions","organizations_url":"https://api.github.com/users/coinfi/orgs","repos_url":"https://api.github.com/users/coinfi/repos","events_url":"https://api.github.com/users/coinfi/events{/privacy}","received_events_url":"https://api.github.com/users/coinfi/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/coinfi/coinfi","description":"CoinFi is the cryptocurrency market intelligence platform.","fork":false,"url":"https://api.github.com/repos/coinfi/coinfi","forks_url":"https://api.github.com/repos/coinfi/coinfi/forks","keys_url":"https://api.github.com/repos/coinfi/coinfi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coinfi/coinfi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coinfi/coinfi/teams","hooks_url":"https://api.github.com/repos/coinfi/coinfi/hooks","issue_events_url":"https://api.github.com/repos/coinfi/coinfi/issues/events{/number}","events_url":"https://api.github.com/repos/coinfi/coinfi/events","assignees_url":"https://api.github.com/repos/coinfi/coinfi/assignees{/user}","branches_url":"https://api.github.com/repos/coinfi/coinfi/branches{/branch}","tags_url":"https://api.github.com/repos/coinfi/coinfi/tags","blobs_url":"https://api.github.com/repos/coinfi/coinfi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coinfi/coinfi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coinfi/coinfi/git/refs{/sha}","trees_url":"https://api.github.com/repos/coinfi/coinfi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coinfi/coinfi/statuses/{sha}","languages_url":"https://api.github.com/repos/coinfi/coinfi/languages","stargazers_url":"https://api.github.com/repos/coinfi/coinfi/stargazers","contributors_url":"https://api.github.com/repos/coinfi/coinfi/contributors","subscribers_url":"https://api.github.com/repos/coinfi/coinfi/subscribers","subscription_url":"https://api.github.com/repos/coinfi/coinfi/subscription","commits_url":"https://api.github.com/repos/coinfi/coinfi/commits{/sha}","git_commits_url":"https://api.github.com/repos/coinfi/coinfi/git/commits{/sha}","comments_url":"https://api.github.com/repos/coinfi/coinfi/comments{/number}","issue_comment_url":"https://api.github.com/repos/coinfi/coinfi/issues/comments{/number}","contents_url":"https://api.github.com/repos/coinfi/coinfi/contents/{+path}","compare_url":"https://api.github.com/repos/coinfi/coinfi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coinfi/coinfi/merges","archive_url":"https://api.github.com/repos/coinfi/coinfi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coinfi/coinfi/downloads","issues_url":"https://api.github.com/repos/coinfi/coinfi/issues{/number}","pulls_url":"https://api.github.com/repos/coinfi/coinfi/pulls{/number}","milestones_url":"https://api.github.com/repos/coinfi/coinfi/milestones{/number}","notifications_url":"https://api.github.com/repos/coinfi/coinfi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coinfi/coinfi/labels{/name}","releases_url":"https://api.github.com/repos/coinfi/coinfi/releases{/id}","deployments_url":"https://api.github.com/repos/coinfi/coinfi/deployments","created_at":"2017-08-31T21:28:02Z","updated_at":"2018-10-16T23:07:00Z","pushed_at":"2018-10-16T23:09:59Z","git_url":"git://github.com/coinfi/coinfi.git","ssh_url":"git@github.com:coinfi/coinfi.git","clone_url":"https://github.com/coinfi/coinfi.git","svn_url":"https://github.com/coinfi/coinfi","homepage":"https://www.coinfi.com","size":130472,"stargazers_count":48,"watchers_count":48,"language":"CSS","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"archived":false,"open_issues_count":13,"license":null,"forks":15,"open_issues":13,"watchers":48,"default_branch":"develop"}},"base":{"label":"coinfi:develop","ref":"develop","sha":"c5c869717936360de8d556dc533ed484c826dd76","user":{"login":"coinfi","id":31571310,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxNTcxMzEw","avatar_url":"https://avatars3.githubusercontent.com/u/31571310?v=4","gravatar_id":"","url":"https://api.github.com/users/coinfi","html_url":"https://github.com/coinfi","followers_url":"https://api.github.com/users/coinfi/followers","following_url":"https://api.github.com/users/coinfi/following{/other_user}","gists_url":"https://api.github.com/users/coinfi/gists{/gist_id}","starred_url":"https://api.github.com/users/coinfi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coinfi/subscriptions","organizations_url":"https://api.github.com/users/coinfi/orgs","repos_url":"https://api.github.com/users/coinfi/repos","events_url":"https://api.github.com/users/coinfi/events{/privacy}","received_events_url":"https://api.github.com/users/coinfi/received_events","type":"Organization","site_admin":false},"repo":{"id":102046959,"node_id":"MDEwOlJlcG9zaXRvcnkxMDIwNDY5NTk=","name":"coinfi","full_name":"coinfi/coinfi","private":false,"owner":{"login":"coinfi","id":31571310,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxNTcxMzEw","avatar_url":"https://avatars3.githubusercontent.com/u/31571310?v=4","gravatar_id":"","url":"https://api.github.com/users/coinfi","html_url":"https://github.com/coinfi","followers_url":"https://api.github.com/users/coinfi/followers","following_url":"https://api.github.com/users/coinfi/following{/other_user}","gists_url":"https://api.github.com/users/coinfi/gists{/gist_id}","starred_url":"https://api.github.com/users/coinfi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coinfi/subscriptions","organizations_url":"https://api.github.com/users/coinfi/orgs","repos_url":"https://api.github.com/users/coinfi/repos","events_url":"https://api.github.com/users/coinfi/events{/privacy}","received_events_url":"https://api.github.com/users/coinfi/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/coinfi/coinfi","description":"CoinFi is the cryptocurrency market intelligence platform.","fork":false,"url":"https://api.github.com/repos/coinfi/coinfi","forks_url":"https://api.github.com/repos/coinfi/coinfi/forks","keys_url":"https://api.github.com/repos/coinfi/coinfi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coinfi/coinfi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coinfi/coinfi/teams","hooks_url":"https://api.github.com/repos/coinfi/coinfi/hooks","issue_events_url":"https://api.github.com/repos/coinfi/coinfi/issues/events{/number}","events_url":"https://api.github.com/repos/coinfi/coinfi/events","assignees_url":"https://api.github.com/repos/coinfi/coinfi/assignees{/user}","branches_url":"https://api.github.com/repos/coinfi/coinfi/branches{/branch}","tags_url":"https://api.github.com/repos/coinfi/coinfi/tags","blobs_url":"https://api.github.com/repos/coinfi/coinfi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coinfi/coinfi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coinfi/coinfi/git/refs{/sha}","trees_url":"https://api.github.com/repos/coinfi/coinfi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coinfi/coinfi/statuses/{sha}","languages_url":"https://api.github.com/repos/coinfi/coinfi/languages","stargazers_url":"https://api.github.com/repos/coinfi/coinfi/stargazers","contributors_url":"https://api.github.com/repos/coinfi/coinfi/contributors","subscribers_url":"https://api.github.com/repos/coinfi/coinfi/subscribers","subscription_url":"https://api.github.com/repos/coinfi/coinfi/subscription","commits_url":"https://api.github.com/repos/coinfi/coinfi/commits{/sha}","git_commits_url":"https://api.github.com/repos/coinfi/coinfi/git/commits{/sha}","comments_url":"https://api.github.com/repos/coinfi/coinfi/comments{/number}","issue_comment_url":"https://api.github.com/repos/coinfi/coinfi/issues/comments{/number}","contents_url":"https://api.github.com/repos/coinfi/coinfi/contents/{+path}","compare_url":"https://api.github.com/repos/coinfi/coinfi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coinfi/coinfi/merges","archive_url":"https://api.github.com/repos/coinfi/coinfi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coinfi/coinfi/downloads","issues_url":"https://api.github.com/repos/coinfi/coinfi/issues{/number}","pulls_url":"https://api.github.com/repos/coinfi/coinfi/pulls{/number}","milestones_url":"https://api.github.com/repos/coinfi/coinfi/milestones{/number}","notifications_url":"https://api.github.com/repos/coinfi/coinfi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coinfi/coinfi/labels{/name}","releases_url":"https://api.github.com/repos/coinfi/coinfi/releases{/id}","deployments_url":"https://api.github.com/repos/coinfi/coinfi/deployments","created_at":"2017-08-31T21:28:02Z","updated_at":"2018-10-16T23:07:00Z","pushed_at":"2018-10-16T23:09:59Z","git_url":"git://github.com/coinfi/coinfi.git","ssh_url":"git@github.com:coinfi/coinfi.git","clone_url":"https://github.com/coinfi/coinfi.git","svn_url":"https://github.com/coinfi/coinfi","homepage":"https://www.coinfi.com","size":130472,"stargazers_count":48,"watchers_count":48,"language":"CSS","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"archived":false,"open_issues_count":13,"license":null,"forks":15,"open_issues":13,"watchers":48,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/coinfi/coinfi/pulls/480"},"html":{"href":"https://github.com/coinfi/coinfi/pull/480"},"issue":{"href":"https://api.github.com/repos/coinfi/coinfi/issues/480"},"comments":{"href":"https://api.github.com/repos/coinfi/coinfi/issues/480/comments"},"review_comments":{"href":"https://api.github.com/repos/coinfi/coinfi/pulls/480/comments"},"review_comment":{"href":"https://api.github.com/repos/coinfi/coinfi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/coinfi/coinfi/pulls/480/commits"},"statuses":{"href":"https://api.github.com/repos/coinfi/coinfi/statuses/c5c799ffea0ddff7b6399b3053cced2c5836211e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"anthotsang"}}