{"action":"created","comment":{"url":"https://api.github.com/repos/balderdashy/waterline-sequel/pulls/comments/43186713","id":43186713,"diff_hunk":"@@ -136,7 +136,12 @@ Sequel.prototype.count = function count(currentTable, queryObject) {\n \n   // Append the sub-query to the COUNT so you end up with something that looks like:\n   // SELECT count(*) as count FROM (SELECT * FROM table LIMIT 10 OFFSET 10) AS tableAlias;","path":"sequel/index.js","position":3,"original_position":3,"commit_id":"d4dd1cc8cd5e10552f27bd8e62a3fc894b7f53b1","original_commit_id":"d4dd1cc8cd5e10552f27bd8e62a3fc894b7f53b1","user":{"login":"devinivy","id":3150233,"avatar_url":"https://avatars.githubusercontent.com/u/3150233?v=3","gravatar_id":"","url":"https://api.github.com/users/devinivy","html_url":"https://github.com/devinivy","followers_url":"https://api.github.com/users/devinivy/followers","following_url":"https://api.github.com/users/devinivy/following{/other_user}","gists_url":"https://api.github.com/users/devinivy/gists{/gist_id}","starred_url":"https://api.github.com/users/devinivy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devinivy/subscriptions","organizations_url":"https://api.github.com/users/devinivy/orgs","repos_url":"https://api.github.com/users/devinivy/repos","events_url":"https://api.github.com/users/devinivy/events{/privacy}","received_events_url":"https://api.github.com/users/devinivy/received_events","type":"User","site_admin":false},"body":"Yeah, in the former case at least.","created_at":"2015-10-27T21:03:03Z","updated_at":"2015-10-27T21:03:03Z","html_url":"https://github.com/balderdashy/waterline-sequel/pull/65#discussion_r43186713","pull_request_url":"https://api.github.com/repos/balderdashy/waterline-sequel/pulls/65","_links":{"self":{"href":"https://api.github.com/repos/balderdashy/waterline-sequel/pulls/comments/43186713"},"html":{"href":"https://github.com/balderdashy/waterline-sequel/pull/65#discussion_r43186713"},"pull_request":{"href":"https://api.github.com/repos/balderdashy/waterline-sequel/pulls/65"}}},"pull_request":{"url":"https://api.github.com/repos/balderdashy/waterline-sequel/pulls/65","id":48925964,"html_url":"https://github.com/balderdashy/waterline-sequel/pull/65","diff_url":"https://github.com/balderdashy/waterline-sequel/pull/65.diff","patch_url":"https://github.com/balderdashy/waterline-sequel/pull/65.patch","issue_url":"https://api.github.com/repos/balderdashy/waterline-sequel/issues/65","number":65,"state":"open","locked":false,"title":"Change function count","user":{"login":"grin0c","id":7963898,"avatar_url":"https://avatars.githubusercontent.com/u/7963898?v=3","gravatar_id":"","url":"https://api.github.com/users/grin0c","html_url":"https://github.com/grin0c","followers_url":"https://api.github.com/users/grin0c/followers","following_url":"https://api.github.com/users/grin0c/following{/other_user}","gists_url":"https://api.github.com/users/grin0c/gists{/gist_id}","starred_url":"https://api.github.com/users/grin0c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grin0c/subscriptions","organizations_url":"https://api.github.com/users/grin0c/orgs","repos_url":"https://api.github.com/users/grin0c/repos","events_url":"https://api.github.com/users/grin0c/events{/privacy}","received_events_url":"https://api.github.com/users/grin0c/received_events","type":"User","site_admin":false},"body":"If no conditions LIMIT and OFFSET, your request will be like this:\r\nSELECT COUNT(*) as count FROM (SELECT * FROM \"tablename\" ) AS \"tablename\".","created_at":"2015-10-27T20:15:39Z","updated_at":"2015-10-27T21:03:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d5ea41d322b772a4c36ea6d20a81245f67d43e25","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/balderdashy/waterline-sequel/pulls/65/commits","review_comments_url":"https://api.github.com/repos/balderdashy/waterline-sequel/pulls/65/comments","review_comment_url":"https://api.github.com/repos/balderdashy/waterline-sequel/pulls/comments{/number}","comments_url":"https://api.github.com/repos/balderdashy/waterline-sequel/issues/65/comments","statuses_url":"https://api.github.com/repos/balderdashy/waterline-sequel/statuses/d4dd1cc8cd5e10552f27bd8e62a3fc894b7f53b1","head":{"label":"grin0c:master","ref":"master","sha":"d4dd1cc8cd5e10552f27bd8e62a3fc894b7f53b1","user":{"login":"grin0c","id":7963898,"avatar_url":"https://avatars.githubusercontent.com/u/7963898?v=3","gravatar_id":"","url":"https://api.github.com/users/grin0c","html_url":"https://github.com/grin0c","followers_url":"https://api.github.com/users/grin0c/followers","following_url":"https://api.github.com/users/grin0c/following{/other_user}","gists_url":"https://api.github.com/users/grin0c/gists{/gist_id}","starred_url":"https://api.github.com/users/grin0c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grin0c/subscriptions","organizations_url":"https://api.github.com/users/grin0c/orgs","repos_url":"https://api.github.com/users/grin0c/repos","events_url":"https://api.github.com/users/grin0c/events{/privacy}","received_events_url":"https://api.github.com/users/grin0c/received_events","type":"User","site_admin":false},"repo":{"id":44868024,"name":"waterline-sequel","full_name":"grin0c/waterline-sequel","owner":{"login":"grin0c","id":7963898,"avatar_url":"https://avatars.githubusercontent.com/u/7963898?v=3","gravatar_id":"","url":"https://api.github.com/users/grin0c","html_url":"https://github.com/grin0c","followers_url":"https://api.github.com/users/grin0c/followers","following_url":"https://api.github.com/users/grin0c/following{/other_user}","gists_url":"https://api.github.com/users/grin0c/gists{/gist_id}","starred_url":"https://api.github.com/users/grin0c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grin0c/subscriptions","organizations_url":"https://api.github.com/users/grin0c/orgs","repos_url":"https://api.github.com/users/grin0c/repos","events_url":"https://api.github.com/users/grin0c/events{/privacy}","received_events_url":"https://api.github.com/users/grin0c/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/grin0c/waterline-sequel","description":"A SQL generator for use in Waterline Adapters","fork":true,"url":"https://api.github.com/repos/grin0c/waterline-sequel","forks_url":"https://api.github.com/repos/grin0c/waterline-sequel/forks","keys_url":"https://api.github.com/repos/grin0c/waterline-sequel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/grin0c/waterline-sequel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/grin0c/waterline-sequel/teams","hooks_url":"https://api.github.com/repos/grin0c/waterline-sequel/hooks","issue_events_url":"https://api.github.com/repos/grin0c/waterline-sequel/issues/events{/number}","events_url":"https://api.github.com/repos/grin0c/waterline-sequel/events","assignees_url":"https://api.github.com/repos/grin0c/waterline-sequel/assignees{/user}","branches_url":"https://api.github.com/repos/grin0c/waterline-sequel/branches{/branch}","tags_url":"https://api.github.com/repos/grin0c/waterline-sequel/tags","blobs_url":"https://api.github.com/repos/grin0c/waterline-sequel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/grin0c/waterline-sequel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/grin0c/waterline-sequel/git/refs{/sha}","trees_url":"https://api.github.com/repos/grin0c/waterline-sequel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/grin0c/waterline-sequel/statuses/{sha}","languages_url":"https://api.github.com/repos/grin0c/waterline-sequel/languages","stargazers_url":"https://api.github.com/repos/grin0c/waterline-sequel/stargazers","contributors_url":"https://api.github.com/repos/grin0c/waterline-sequel/contributors","subscribers_url":"https://api.github.com/repos/grin0c/waterline-sequel/subscribers","subscription_url":"https://api.github.com/repos/grin0c/waterline-sequel/subscription","commits_url":"https://api.github.com/repos/grin0c/waterline-sequel/commits{/sha}","git_commits_url":"https://api.github.com/repos/grin0c/waterline-sequel/git/commits{/sha}","comments_url":"https://api.github.com/repos/grin0c/waterline-sequel/comments{/number}","issue_comment_url":"https://api.github.com/repos/grin0c/waterline-sequel/issues/comments{/number}","contents_url":"https://api.github.com/repos/grin0c/waterline-sequel/contents/{+path}","compare_url":"https://api.github.com/repos/grin0c/waterline-sequel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/grin0c/waterline-sequel/merges","archive_url":"https://api.github.com/repos/grin0c/waterline-sequel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/grin0c/waterline-sequel/downloads","issues_url":"https://api.github.com/repos/grin0c/waterline-sequel/issues{/number}","pulls_url":"https://api.github.com/repos/grin0c/waterline-sequel/pulls{/number}","milestones_url":"https://api.github.com/repos/grin0c/waterline-sequel/milestones{/number}","notifications_url":"https://api.github.com/repos/grin0c/waterline-sequel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/grin0c/waterline-sequel/labels{/name}","releases_url":"https://api.github.com/repos/grin0c/waterline-sequel/releases{/id}","created_at":"2015-10-24T13:44:42Z","updated_at":"2015-10-24T13:44:43Z","pushed_at":"2015-10-24T13:59:20Z","git_url":"git://github.com/grin0c/waterline-sequel.git","ssh_url":"git@github.com:grin0c/waterline-sequel.git","clone_url":"https://github.com/grin0c/waterline-sequel.git","svn_url":"https://github.com/grin0c/waterline-sequel","homepage":null,"size":197,"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":"balderdashy:master","ref":"master","sha":"ef4294372c8c39bbeecdf65699e12189db357ebd","user":{"login":"balderdashy","id":1445252,"avatar_url":"https://avatars.githubusercontent.com/u/1445252?v=3","gravatar_id":"","url":"https://api.github.com/users/balderdashy","html_url":"https://github.com/balderdashy","followers_url":"https://api.github.com/users/balderdashy/followers","following_url":"https://api.github.com/users/balderdashy/following{/other_user}","gists_url":"https://api.github.com/users/balderdashy/gists{/gist_id}","starred_url":"https://api.github.com/users/balderdashy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/balderdashy/subscriptions","organizations_url":"https://api.github.com/users/balderdashy/orgs","repos_url":"https://api.github.com/users/balderdashy/repos","events_url":"https://api.github.com/users/balderdashy/events{/privacy}","received_events_url":"https://api.github.com/users/balderdashy/received_events","type":"Organization","site_admin":false},"repo":{"id":22395078,"name":"waterline-sequel","full_name":"balderdashy/waterline-sequel","owner":{"login":"balderdashy","id":1445252,"avatar_url":"https://avatars.githubusercontent.com/u/1445252?v=3","gravatar_id":"","url":"https://api.github.com/users/balderdashy","html_url":"https://github.com/balderdashy","followers_url":"https://api.github.com/users/balderdashy/followers","following_url":"https://api.github.com/users/balderdashy/following{/other_user}","gists_url":"https://api.github.com/users/balderdashy/gists{/gist_id}","starred_url":"https://api.github.com/users/balderdashy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/balderdashy/subscriptions","organizations_url":"https://api.github.com/users/balderdashy/orgs","repos_url":"https://api.github.com/users/balderdashy/repos","events_url":"https://api.github.com/users/balderdashy/events{/privacy}","received_events_url":"https://api.github.com/users/balderdashy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/balderdashy/waterline-sequel","description":"A SQL generator for use in Waterline Adapters","fork":false,"url":"https://api.github.com/repos/balderdashy/waterline-sequel","forks_url":"https://api.github.com/repos/balderdashy/waterline-sequel/forks","keys_url":"https://api.github.com/repos/balderdashy/waterline-sequel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/balderdashy/waterline-sequel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/balderdashy/waterline-sequel/teams","hooks_url":"https://api.github.com/repos/balderdashy/waterline-sequel/hooks","issue_events_url":"https://api.github.com/repos/balderdashy/waterline-sequel/issues/events{/number}","events_url":"https://api.github.com/repos/balderdashy/waterline-sequel/events","assignees_url":"https://api.github.com/repos/balderdashy/waterline-sequel/assignees{/user}","branches_url":"https://api.github.com/repos/balderdashy/waterline-sequel/branches{/branch}","tags_url":"https://api.github.com/repos/balderdashy/waterline-sequel/tags","blobs_url":"https://api.github.com/repos/balderdashy/waterline-sequel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/balderdashy/waterline-sequel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/balderdashy/waterline-sequel/git/refs{/sha}","trees_url":"https://api.github.com/repos/balderdashy/waterline-sequel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/balderdashy/waterline-sequel/statuses/{sha}","languages_url":"https://api.github.com/repos/balderdashy/waterline-sequel/languages","stargazers_url":"https://api.github.com/repos/balderdashy/waterline-sequel/stargazers","contributors_url":"https://api.github.com/repos/balderdashy/waterline-sequel/contributors","subscribers_url":"https://api.github.com/repos/balderdashy/waterline-sequel/subscribers","subscription_url":"https://api.github.com/repos/balderdashy/waterline-sequel/subscription","commits_url":"https://api.github.com/repos/balderdashy/waterline-sequel/commits{/sha}","git_commits_url":"https://api.github.com/repos/balderdashy/waterline-sequel/git/commits{/sha}","comments_url":"https://api.github.com/repos/balderdashy/waterline-sequel/comments{/number}","issue_comment_url":"https://api.github.com/repos/balderdashy/waterline-sequel/issues/comments{/number}","contents_url":"https://api.github.com/repos/balderdashy/waterline-sequel/contents/{+path}","compare_url":"https://api.github.com/repos/balderdashy/waterline-sequel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/balderdashy/waterline-sequel/merges","archive_url":"https://api.github.com/repos/balderdashy/waterline-sequel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/balderdashy/waterline-sequel/downloads","issues_url":"https://api.github.com/repos/balderdashy/waterline-sequel/issues{/number}","pulls_url":"https://api.github.com/repos/balderdashy/waterline-sequel/pulls{/number}","milestones_url":"https://api.github.com/repos/balderdashy/waterline-sequel/milestones{/number}","notifications_url":"https://api.github.com/repos/balderdashy/waterline-sequel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/balderdashy/waterline-sequel/labels{/name}","releases_url":"https://api.github.com/repos/balderdashy/waterline-sequel/releases{/id}","created_at":"2014-07-29T20:52:08Z","updated_at":"2015-09-13T06:18:05Z","pushed_at":"2015-10-27T20:15:39Z","git_url":"git://github.com/balderdashy/waterline-sequel.git","ssh_url":"git@github.com:balderdashy/waterline-sequel.git","clone_url":"https://github.com/balderdashy/waterline-sequel.git","svn_url":"https://github.com/balderdashy/waterline-sequel","homepage":null,"size":711,"stargazers_count":15,"watchers_count":15,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":48,"mirror_url":null,"open_issues_count":15,"forks":48,"open_issues":15,"watchers":15,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/balderdashy/waterline-sequel/pulls/65"},"html":{"href":"https://github.com/balderdashy/waterline-sequel/pull/65"},"issue":{"href":"https://api.github.com/repos/balderdashy/waterline-sequel/issues/65"},"comments":{"href":"https://api.github.com/repos/balderdashy/waterline-sequel/issues/65/comments"},"review_comments":{"href":"https://api.github.com/repos/balderdashy/waterline-sequel/pulls/65/comments"},"review_comment":{"href":"https://api.github.com/repos/balderdashy/waterline-sequel/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/balderdashy/waterline-sequel/pulls/65/commits"},"statuses":{"href":"https://api.github.com/repos/balderdashy/waterline-sequel/statuses/d4dd1cc8cd5e10552f27bd8e62a3fc894b7f53b1"}}}}