From: Mike Bayer Date: Fri, 5 May 2006 00:42:42 +0000 (+0000) Subject: fixed HAVING/ORDER BY order, 0.1.7 prep X-Git-Tag: rel_0_1_7~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dec6e3b80f40c249207642d4fa6e9feca7a5a8c9;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git fixed HAVING/ORDER BY order, 0.1.7 prep --- diff --git a/CHANGES b/CHANGES index 99eb0bc10f..ee22d6ce9a 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,30 @@ -next +0.1.7 - some fixes to topological sort algorithm +- added DISTINCT ON support to Postgres (just supply distinct=[col1,col2..]) +- "order_by" mapper property inherited from inheriting mapper +- fix to column type used when mapper UPDATES/DELETEs +- with convert_unicode=True, reflection was failing, has been fixed +- types types types! still werent working....have to use TypeDecorator again :( +- mysql binary type converts array output to buffer, fixes PickleType +- fixed the attributes.py memory leak once and for all +- unittests are qualified based on the databases that support each one +- fixed bug where column defaults would clobber VALUES clause of insert objects +- fixed bug where table def w/ schema name would force engine connection +- fix for parenthesis to work correctly with subqueries in INSERT/UPDATE +- HistoryArraySet gets extend() method +- fixed lazyload support for other comparison operators besides = +- lazyload fix where two comparisons in the join condition point to the +samem column +- added "construct_new" flag to mapper, will use __new__ to create instances +instead of __init__ (standard in 0.2) +- added selectresults.py to SVN, missed it last time +- tweak to allow a many-to-many relationship from a table to itself via +an association table +- small fix to "translate_row" function used by polymorphic example +- create_engine uses cgi.parse_qsl to read query string (out the window in 0.2) +- tweaks to CAST operator +- fixed function names LOCAL_TIME/LOCAL_TIMESTAMP -> LOCALTIME/LOCALTIMESTAMP +- fixed order of ORDER BY/HAVING in compile 0.1.6 - support for MS-SQL added courtesy Rick Morrison, Runar Petursson diff --git a/lib/sqlalchemy/ansisql.py b/lib/sqlalchemy/ansisql.py index a344e017c7..602da58eef 100644 --- a/lib/sqlalchemy/ansisql.py +++ b/lib/sqlalchemy/ansisql.py @@ -371,14 +371,14 @@ class ANSICompiler(sql.Compiled): if group_by: text += " GROUP BY " + group_by - order_by = self.get_str(select.order_by_clause) - if order_by: - text += " ORDER BY " + order_by - if select.having is not None: t = self.get_str(select.having) if t: text += " \nHAVING " + t + + order_by = self.get_str(select.order_by_clause) + if order_by: + text += " ORDER BY " + order_by text += self.visit_select_postclauses(select) diff --git a/setup.py b/setup.py index 690c945e45..ac069f8a06 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ use_setuptools() from setuptools import setup, find_packages setup(name = "SQLAlchemy", - version = "0.1.6", + version = "0.1.7", description = "Database Abstraction Library", author = "Mike Bayer", author_email = "mike_mp@zzzcomputing.com",