{"action":"created","comment":{"url":"https://api.github.com/repos/scylladb/gocqlx/pulls/comments/187935212","pull_request_review_id":119811470,"id":187935212,"diff_hunk":"@@ -49,3 +49,12 @@ func MaxTimeuuid(name string) *Func {\n func Now() *Func {\n \treturn Fn(\"now\")\n }\n+\n+// Count produces COUNT(field_name) or COUNT(*).\n+func Count(paramNames ...string) *Func {\n+\tname := \"COUNT\"\n+\tif len(paramNames) > 0 {\n+\t\treturn Fn(name, paramNames...)\n+\t}\n+\treturn Fn(name, \"*\")\n+}","path":"qb/func.go","position":12,"original_position":12,"commit_id":"988597da44843bfd174fbffc01fe4981729b7663","original_commit_id":"988597da44843bfd174fbffc01fe4981729b7663","user":{"login":"mmatczuk","id":1617930,"avatar_url":"https://avatars3.githubusercontent.com/u/1617930?v=4","gravatar_id":"","url":"https://api.github.com/users/mmatczuk","html_url":"https://github.com/mmatczuk","followers_url":"https://api.github.com/users/mmatczuk/followers","following_url":"https://api.github.com/users/mmatczuk/following{/other_user}","gists_url":"https://api.github.com/users/mmatczuk/gists{/gist_id}","starred_url":"https://api.github.com/users/mmatczuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmatczuk/subscriptions","organizations_url":"https://api.github.com/users/mmatczuk/orgs","repos_url":"https://api.github.com/users/mmatczuk/repos","events_url":"https://api.github.com/users/mmatczuk/events{/privacy}","received_events_url":"https://api.github.com/users/mmatczuk/received_events","type":"User","site_admin":false},"body":"How about adding Min and Max? They Seem to be frequently used functions too.","created_at":"2018-05-14T12:31:17Z","updated_at":"2018-05-14T12:50:46Z","html_url":"https://github.com/scylladb/gocqlx/pull/39#discussion_r187935212","pull_request_url":"https://api.github.com/repos/scylladb/gocqlx/pulls/39","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/scylladb/gocqlx/pulls/comments/187935212"},"html":{"href":"https://github.com/scylladb/gocqlx/pull/39#discussion_r187935212"},"pull_request":{"href":"https://api.github.com/repos/scylladb/gocqlx/pulls/39"}}},"pull_request":{"url":"https://api.github.com/repos/scylladb/gocqlx/pulls/39","id":187495370,"html_url":"https://github.com/scylladb/gocqlx/pull/39","diff_url":"https://github.com/scylladb/gocqlx/pull/39.diff","patch_url":"https://github.com/scylladb/gocqlx/pull/39.patch","issue_url":"https://api.github.com/repos/scylladb/gocqlx/issues/39","number":39,"state":"open","locked":false,"title":"Add aggregation function to select query builder","user":{"login":"SpiritOfWill","id":14132203,"avatar_url":"https://avatars2.githubusercontent.com/u/14132203?v=4","gravatar_id":"","url":"https://api.github.com/users/SpiritOfWill","html_url":"https://github.com/SpiritOfWill","followers_url":"https://api.github.com/users/SpiritOfWill/followers","following_url":"https://api.github.com/users/SpiritOfWill/following{/other_user}","gists_url":"https://api.github.com/users/SpiritOfWill/gists{/gist_id}","starred_url":"https://api.github.com/users/SpiritOfWill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpiritOfWill/subscriptions","organizations_url":"https://api.github.com/users/SpiritOfWill/orgs","repos_url":"https://api.github.com/users/SpiritOfWill/repos","events_url":"https://api.github.com/users/SpiritOfWill/events{/privacy}","received_events_url":"https://api.github.com/users/SpiritOfWill/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-05-11T15:24:43Z","updated_at":"2018-05-14T12:50:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"287963f84bc57a84b1ecd088e5578b7d5a952d9d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/scylladb/gocqlx/pulls/39/commits","review_comments_url":"https://api.github.com/repos/scylladb/gocqlx/pulls/39/comments","review_comment_url":"https://api.github.com/repos/scylladb/gocqlx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scylladb/gocqlx/issues/39/comments","statuses_url":"https://api.github.com/repos/scylladb/gocqlx/statuses/988597da44843bfd174fbffc01fe4981729b7663","head":{"label":"SpiritOfWill:qb-add-aggregation-func-to-select","ref":"qb-add-aggregation-func-to-select","sha":"988597da44843bfd174fbffc01fe4981729b7663","user":{"login":"SpiritOfWill","id":14132203,"avatar_url":"https://avatars2.githubusercontent.com/u/14132203?v=4","gravatar_id":"","url":"https://api.github.com/users/SpiritOfWill","html_url":"https://github.com/SpiritOfWill","followers_url":"https://api.github.com/users/SpiritOfWill/followers","following_url":"https://api.github.com/users/SpiritOfWill/following{/other_user}","gists_url":"https://api.github.com/users/SpiritOfWill/gists{/gist_id}","starred_url":"https://api.github.com/users/SpiritOfWill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpiritOfWill/subscriptions","organizations_url":"https://api.github.com/users/SpiritOfWill/orgs","repos_url":"https://api.github.com/users/SpiritOfWill/repos","events_url":"https://api.github.com/users/SpiritOfWill/events{/privacy}","received_events_url":"https://api.github.com/users/SpiritOfWill/received_events","type":"User","site_admin":false},"repo":{"id":133028848,"name":"gocqlx","full_name":"SpiritOfWill/gocqlx","owner":{"login":"SpiritOfWill","id":14132203,"avatar_url":"https://avatars2.githubusercontent.com/u/14132203?v=4","gravatar_id":"","url":"https://api.github.com/users/SpiritOfWill","html_url":"https://github.com/SpiritOfWill","followers_url":"https://api.github.com/users/SpiritOfWill/followers","following_url":"https://api.github.com/users/SpiritOfWill/following{/other_user}","gists_url":"https://api.github.com/users/SpiritOfWill/gists{/gist_id}","starred_url":"https://api.github.com/users/SpiritOfWill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpiritOfWill/subscriptions","organizations_url":"https://api.github.com/users/SpiritOfWill/orgs","repos_url":"https://api.github.com/users/SpiritOfWill/repos","events_url":"https://api.github.com/users/SpiritOfWill/events{/privacy}","received_events_url":"https://api.github.com/users/SpiritOfWill/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SpiritOfWill/gocqlx","description":"Go toolkit for ScyllaDB and Apache Cassandra®","fork":true,"url":"https://api.github.com/repos/SpiritOfWill/gocqlx","forks_url":"https://api.github.com/repos/SpiritOfWill/gocqlx/forks","keys_url":"https://api.github.com/repos/SpiritOfWill/gocqlx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SpiritOfWill/gocqlx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SpiritOfWill/gocqlx/teams","hooks_url":"https://api.github.com/repos/SpiritOfWill/gocqlx/hooks","issue_events_url":"https://api.github.com/repos/SpiritOfWill/gocqlx/issues/events{/number}","events_url":"https://api.github.com/repos/SpiritOfWill/gocqlx/events","assignees_url":"https://api.github.com/repos/SpiritOfWill/gocqlx/assignees{/user}","branches_url":"https://api.github.com/repos/SpiritOfWill/gocqlx/branches{/branch}","tags_url":"https://api.github.com/repos/SpiritOfWill/gocqlx/tags","blobs_url":"https://api.github.com/repos/SpiritOfWill/gocqlx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SpiritOfWill/gocqlx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SpiritOfWill/gocqlx/git/refs{/sha}","trees_url":"https://api.github.com/repos/SpiritOfWill/gocqlx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SpiritOfWill/gocqlx/statuses/{sha}","languages_url":"https://api.github.com/repos/SpiritOfWill/gocqlx/languages","stargazers_url":"https://api.github.com/repos/SpiritOfWill/gocqlx/stargazers","contributors_url":"https://api.github.com/repos/SpiritOfWill/gocqlx/contributors","subscribers_url":"https://api.github.com/repos/SpiritOfWill/gocqlx/subscribers","subscription_url":"https://api.github.com/repos/SpiritOfWill/gocqlx/subscription","commits_url":"https://api.github.com/repos/SpiritOfWill/gocqlx/commits{/sha}","git_commits_url":"https://api.github.com/repos/SpiritOfWill/gocqlx/git/commits{/sha}","comments_url":"https://api.github.com/repos/SpiritOfWill/gocqlx/comments{/number}","issue_comment_url":"https://api.github.com/repos/SpiritOfWill/gocqlx/issues/comments{/number}","contents_url":"https://api.github.com/repos/SpiritOfWill/gocqlx/contents/{+path}","compare_url":"https://api.github.com/repos/SpiritOfWill/gocqlx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SpiritOfWill/gocqlx/merges","archive_url":"https://api.github.com/repos/SpiritOfWill/gocqlx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SpiritOfWill/gocqlx/downloads","issues_url":"https://api.github.com/repos/SpiritOfWill/gocqlx/issues{/number}","pulls_url":"https://api.github.com/repos/SpiritOfWill/gocqlx/pulls{/number}","milestones_url":"https://api.github.com/repos/SpiritOfWill/gocqlx/milestones{/number}","notifications_url":"https://api.github.com/repos/SpiritOfWill/gocqlx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SpiritOfWill/gocqlx/labels{/name}","releases_url":"https://api.github.com/repos/SpiritOfWill/gocqlx/releases{/id}","deployments_url":"https://api.github.com/repos/SpiritOfWill/gocqlx/deployments","created_at":"2018-05-11T10:59:40Z","updated_at":"2018-05-11T10:59:42Z","pushed_at":"2018-05-14T12:00:20Z","git_url":"git://github.com/SpiritOfWill/gocqlx.git","ssh_url":"git@github.com:SpiritOfWill/gocqlx.git","clone_url":"https://github.com/SpiritOfWill/gocqlx.git","svn_url":"https://github.com/SpiritOfWill/gocqlx","homepage":"","size":139,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"scylladb:master","ref":"master","sha":"ecf0820d1d197f7252c0c2c7be055f218aeb87e1","user":{"login":"scylladb","id":14364730,"avatar_url":"https://avatars2.githubusercontent.com/u/14364730?v=4","gravatar_id":"","url":"https://api.github.com/users/scylladb","html_url":"https://github.com/scylladb","followers_url":"https://api.github.com/users/scylladb/followers","following_url":"https://api.github.com/users/scylladb/following{/other_user}","gists_url":"https://api.github.com/users/scylladb/gists{/gist_id}","starred_url":"https://api.github.com/users/scylladb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scylladb/subscriptions","organizations_url":"https://api.github.com/users/scylladb/orgs","repos_url":"https://api.github.com/users/scylladb/repos","events_url":"https://api.github.com/users/scylladb/events{/privacy}","received_events_url":"https://api.github.com/users/scylladb/received_events","type":"Organization","site_admin":false},"repo":{"id":97840838,"name":"gocqlx","full_name":"scylladb/gocqlx","owner":{"login":"scylladb","id":14364730,"avatar_url":"https://avatars2.githubusercontent.com/u/14364730?v=4","gravatar_id":"","url":"https://api.github.com/users/scylladb","html_url":"https://github.com/scylladb","followers_url":"https://api.github.com/users/scylladb/followers","following_url":"https://api.github.com/users/scylladb/following{/other_user}","gists_url":"https://api.github.com/users/scylladb/gists{/gist_id}","starred_url":"https://api.github.com/users/scylladb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scylladb/subscriptions","organizations_url":"https://api.github.com/users/scylladb/orgs","repos_url":"https://api.github.com/users/scylladb/repos","events_url":"https://api.github.com/users/scylladb/events{/privacy}","received_events_url":"https://api.github.com/users/scylladb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scylladb/gocqlx","description":"Go toolkit for ScyllaDB and Apache Cassandra®","fork":false,"url":"https://api.github.com/repos/scylladb/gocqlx","forks_url":"https://api.github.com/repos/scylladb/gocqlx/forks","keys_url":"https://api.github.com/repos/scylladb/gocqlx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scylladb/gocqlx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scylladb/gocqlx/teams","hooks_url":"https://api.github.com/repos/scylladb/gocqlx/hooks","issue_events_url":"https://api.github.com/repos/scylladb/gocqlx/issues/events{/number}","events_url":"https://api.github.com/repos/scylladb/gocqlx/events","assignees_url":"https://api.github.com/repos/scylladb/gocqlx/assignees{/user}","branches_url":"https://api.github.com/repos/scylladb/gocqlx/branches{/branch}","tags_url":"https://api.github.com/repos/scylladb/gocqlx/tags","blobs_url":"https://api.github.com/repos/scylladb/gocqlx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scylladb/gocqlx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scylladb/gocqlx/git/refs{/sha}","trees_url":"https://api.github.com/repos/scylladb/gocqlx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scylladb/gocqlx/statuses/{sha}","languages_url":"https://api.github.com/repos/scylladb/gocqlx/languages","stargazers_url":"https://api.github.com/repos/scylladb/gocqlx/stargazers","contributors_url":"https://api.github.com/repos/scylladb/gocqlx/contributors","subscribers_url":"https://api.github.com/repos/scylladb/gocqlx/subscribers","subscription_url":"https://api.github.com/repos/scylladb/gocqlx/subscription","commits_url":"https://api.github.com/repos/scylladb/gocqlx/commits{/sha}","git_commits_url":"https://api.github.com/repos/scylladb/gocqlx/git/commits{/sha}","comments_url":"https://api.github.com/repos/scylladb/gocqlx/comments{/number}","issue_comment_url":"https://api.github.com/repos/scylladb/gocqlx/issues/comments{/number}","contents_url":"https://api.github.com/repos/scylladb/gocqlx/contents/{+path}","compare_url":"https://api.github.com/repos/scylladb/gocqlx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scylladb/gocqlx/merges","archive_url":"https://api.github.com/repos/scylladb/gocqlx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scylladb/gocqlx/downloads","issues_url":"https://api.github.com/repos/scylladb/gocqlx/issues{/number}","pulls_url":"https://api.github.com/repos/scylladb/gocqlx/pulls{/number}","milestones_url":"https://api.github.com/repos/scylladb/gocqlx/milestones{/number}","notifications_url":"https://api.github.com/repos/scylladb/gocqlx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scylladb/gocqlx/labels{/name}","releases_url":"https://api.github.com/repos/scylladb/gocqlx/releases{/id}","deployments_url":"https://api.github.com/repos/scylladb/gocqlx/deployments","created_at":"2017-07-20T13:50:33Z","updated_at":"2018-05-11T10:59:37Z","pushed_at":"2018-05-14T12:00:21Z","git_url":"git://github.com/scylladb/gocqlx.git","ssh_url":"git@github.com:scylladb/gocqlx.git","clone_url":"https://github.com/scylladb/gocqlx.git","svn_url":"https://github.com/scylladb/gocqlx","homepage":"","size":137,"stargazers_count":146,"watchers_count":146,"language":"Go","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":5,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":15,"open_issues":5,"watchers":146,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scylladb/gocqlx/pulls/39"},"html":{"href":"https://github.com/scylladb/gocqlx/pull/39"},"issue":{"href":"https://api.github.com/repos/scylladb/gocqlx/issues/39"},"comments":{"href":"https://api.github.com/repos/scylladb/gocqlx/issues/39/comments"},"review_comments":{"href":"https://api.github.com/repos/scylladb/gocqlx/pulls/39/comments"},"review_comment":{"href":"https://api.github.com/repos/scylladb/gocqlx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scylladb/gocqlx/pulls/39/commits"},"statuses":{"href":"https://api.github.com/repos/scylladb/gocqlx/statuses/988597da44843bfd174fbffc01fe4981729b7663"}},"author_association":"NONE"}}
{"actor":{"display_login":"mmatczuk"}}