{"action":"created","issue":{"url":"https://api.github.com/repos/tgriesser/knex/issues/2449","repository_url":"https://api.github.com/repos/tgriesser/knex","labels_url":"https://api.github.com/repos/tgriesser/knex/issues/2449/labels{/name}","comments_url":"https://api.github.com/repos/tgriesser/knex/issues/2449/comments","events_url":"https://api.github.com/repos/tgriesser/knex/issues/2449/events","html_url":"https://github.com/tgriesser/knex/pull/2449","id":293332486,"number":2449,"title":"feat: countDistinct with multiple columns","user":{"login":"joelmukuthu","id":374638,"avatar_url":"https://avatars2.githubusercontent.com/u/374638?v=4","gravatar_id":"","url":"https://api.github.com/users/joelmukuthu","html_url":"https://github.com/joelmukuthu","followers_url":"https://api.github.com/users/joelmukuthu/followers","following_url":"https://api.github.com/users/joelmukuthu/following{/other_user}","gists_url":"https://api.github.com/users/joelmukuthu/gists{/gist_id}","starred_url":"https://api.github.com/users/joelmukuthu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joelmukuthu/subscriptions","organizations_url":"https://api.github.com/users/joelmukuthu/orgs","repos_url":"https://api.github.com/users/joelmukuthu/repos","events_url":"https://api.github.com/users/joelmukuthu/events{/privacy}","received_events_url":"https://api.github.com/users/joelmukuthu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-01-31T22:18:15Z","updated_at":"2018-02-16T21:34:10Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/tgriesser/knex/pulls/2449","html_url":"https://github.com/tgriesser/knex/pull/2449","diff_url":"https://github.com/tgriesser/knex/pull/2449.diff","patch_url":"https://github.com/tgriesser/knex/pull/2449.patch"},"body":"Closes #1776 "},"comment":{"url":"https://api.github.com/repos/tgriesser/knex/issues/comments/366364683","html_url":"https://github.com/tgriesser/knex/pull/2449#issuecomment-366364683","issue_url":"https://api.github.com/repos/tgriesser/knex/issues/2449","id":366364683,"user":{"login":"joelmukuthu","id":374638,"avatar_url":"https://avatars2.githubusercontent.com/u/374638?v=4","gravatar_id":"","url":"https://api.github.com/users/joelmukuthu","html_url":"https://github.com/joelmukuthu","followers_url":"https://api.github.com/users/joelmukuthu/followers","following_url":"https://api.github.com/users/joelmukuthu/following{/other_user}","gists_url":"https://api.github.com/users/joelmukuthu/gists{/gist_id}","starred_url":"https://api.github.com/users/joelmukuthu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joelmukuthu/subscriptions","organizations_url":"https://api.github.com/users/joelmukuthu/orgs","repos_url":"https://api.github.com/users/joelmukuthu/repos","events_url":"https://api.github.com/users/joelmukuthu/events{/privacy}","received_events_url":"https://api.github.com/users/joelmukuthu/received_events","type":"User","site_admin":false},"created_at":"2018-02-16T21:34:09Z","updated_at":"2018-02-16T21:34:09Z","author_association":"CONTRIBUTOR","body":"Sorry for the delay on this, but I'm looking to implement it now and found a weird edge-case. At the moment, you can specify an alias for `countDistinct` like `builder.countDistinct('column as alias')` and that get's transformed to `select count(distinct column) as alias`.\r\n\r\nThis of course won't work with multiple fields so I suggest we change this to the regular object notation like `builder.countDistinct({ alias: 'column' })` or with multiple fields `builder.countDistinct({ alias: ['column1', 'column2'] })`.\r\n\r\nI'll leave the current behaviour and only add the object notation as a new feature but maybe we can even add a deprecation notice for it. What do you think @elhigu?"}}
{"actor":{"display_login":"joelmukuthu"}}