Skip to content

Support countDistinct in Kotlin #192

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
white-ws opened this issue Apr 22, 2020 · 0 comments · Fixed by #221
Closed

Support countDistinct in Kotlin #192

white-ws opened this issue Apr 22, 2020 · 0 comments · Fixed by #221

Comments

@white-ws
Copy link

countDistinct was introduced in version 1.1.3. But i couldn't find a mapper function for Kotlin.

Currently i can make a work around by using SelectCompleter like this.

fun countDistinct(mapper: (SelectStatementProvider) -> Long, column: BasicColumn, table: SqlTable, completer: SelectCompleter) = 
    mapper(select(countDistinct(column)).from(table, completer))

But it would be nice to have an official implementation using KotlinCountBuilder. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant