public
Rubygem
Description: Extras for DataMapper, including bridges to DataObjects::Migrations and Merb::DataMapper
Homepage: http://datamapper.org
Clone URL: git://github.com/sam/dm-more.git
Commented out ORDER BY until GROUP BY is added
Dan Kubb (author)
Tue Jun 24 10:06:41 -0700 2008
commit  ef27ad506787d80131e9fc93814d2b82e5b6fb49
tree    b228244f8e3c632b5b127797c5dd71450fd6d26e
parent  47b8a82b187f95dfb4702ebd0b99903fcf2daf44
...
33
34
35
36
 
 
 
 
 
37
38
39
...
33
34
35
 
36
37
38
39
40
41
42
43
0
@@ -33,7 +33,11 @@ module DataMapper
0
           statement << " FROM #{quote_table_name(query.model.storage_name(query.repository.name))}"
0
           statement << links_statement(query)                        if query.links.any?
0
           statement << " WHERE #{conditions_statement(query)}"       if query.conditions.any?
0
-          statement << " ORDER BY #{order_statement(query)}"         if query.order.any?
0
+
0
+          # TODO: when GROUP BY support added, uncomment this, and (by default) have
0
+          # it sort on the non-aggregate fields being SELECTed
0
+          #statement << " ORDER BY #{order_statement(query)}"         if query.order.any?
0
+
0
           statement << " LIMIT #{quote_column_value(query.limit)}"   if query.limit
0
           statement << " OFFSET #{quote_column_value(query.offset)}" if query.offset && query.offset > 0
0
           statement

Comments