Skip to content

Support count(distinct xx) #112

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
SuperManJin opened this issue Jul 6, 2019 · 1 comment · Fixed by #113
Closed

Support count(distinct xx) #112

SuperManJin opened this issue Jul 6, 2019 · 1 comment · Fixed by #113
Milestone

Comments

@SuperManJin
Copy link

mybatis-dynamic-sql:1.1.1
oracle jdk1.8
l want to execute the following query
select count( distinct company_code) from table
but selectDistinct function belong to FromGatherer
count function belong to BasicColumn
I can't construct a query through mybatis-dynamic-sql。
I am searching for a long time on net. But no use. Please help or try to give some ideas how to achieve this.
Does it support?
and What should I do if support ?
Thanks in advance.

@jeffgbutler
Copy link
Member

This is not in the library currently, but I will add it.

In the meantime, it is very easy to add this with your own code. All you need to do is copy the existing Count class and change the render method.

@jeffgbutler jeffgbutler added this to the 1.1.3 milestone Jul 7, 2019
@jeffgbutler jeffgbutler changed the title Does it support count(distinct xx)? Support count(distinct xx) Jul 7, 2019
jeffgbutler referenced this issue in jeffgbutler/mybatis-dynamic-sql Jul 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants