pypika
pypika copied to clipboard
Distinct method is not documented
How you guys would expect a distinct to be written?
I can't see any viable method and the only solution I can think of is a small hack to parse the returned sql and split immediately after the SELECT statement. Not elegant, but it can work I guess.
Any idea is welcome
Query.from_("abc").select("foo").distinct()
'SELECT DISTINCT "foo" FROM "abc"'
Worth updating the main guide then, because I based my comment from that.
Hmm makes sense, I'll leave the ticket open with a documentation label.
@gl3nn I created a new README.rst for this issue but couldn't push my changes to a branch I made (403 error). I was able to authenticate with Gitub using my browser credentials so not sure of the issue. ANy ideas?