Re: [sqlalchemy] api omission? the postgres DISTINCT ON(columns) is only in the ORM, not in the sql expression

2013-09-19 Thread Michael Bayer
the standalone function distinct is only in core can you be more specific here distinct on is specific to posrtgresql, and is provided by select.distinct, query.distinct. the latter makes use of the former, so obviously both have the same features. On Sep 18, 2013, at 8:36 PM, Jonathan

Re: [sqlalchemy] api omission? the postgres DISTINCT ON(columns) is only in the ORM, not in the sql expression

2013-09-19 Thread Jonathan Vanasco
Oh crap. I understand. I was trying to do this: query = select( func.distinct( columns ) ) and not query = distinct( columns ) i got thrown off, because the postgres tool is more like a function than an query , and there's also the .distinct() method you can toss onto a query;

[sqlalchemy] api omission? the postgres DISTINCT ON(columns) is only in the ORM, not in the sql expression

2013-09-18 Thread Jonathan Vanasco
this tripped me up when i was working on some queries. orm : distinct( column ) = DISTINCT ON (column) core : distinct( column ) = DISTINCT (column) there doesn't seem to be an easy way to write DISTINCT ON (column) in the orm -- You received this message because you are