On 2016-09-14 00:10, Ruben Nielsen wrote:
> Any plans on adding SELECT DISTINCT? I see in the code, that there is a 
> TODO comment in place.

Usually DISTINCT can be avoided by using a GROUP BY.
But it should not be too difficult to implement.

> For other missing features like Postgres specific functions and types, I've 
> been able to add my own classes in a support library and use them, but 
> there is no clear way to replace you Select definition with my own, without 
> altering your source.
> 
> Best I can do for now is to create a subclass of your Select, add my 
> desired functionality and then monkey-patch sql.From.select function like
> 
> class MySelect(sql.Select):
>     # ...
> 
> def monkey_select(self, *args, **kwargs):
>     return MySelect(args, from_=self, **kwargs)
> 
> sql.From.select = monkey_select


Yes this was not planned to support Select replacement.
Indeed what do you try to add?

-- 
Cédric Krier - B2CK SPRL
Email/Jabber: cedric.kr...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

-- 
You received this message because you are subscribed to the Google Groups 
"python-sql" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python-sql+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to