]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- added options() method to SelectResults, equivalent to query.options() [ticket...
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 10 Feb 2007 23:41:56 +0000 (23:41 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 10 Feb 2007 23:41:56 +0000 (23:41 +0000)
CHANGES
lib/sqlalchemy/ext/selectresults.py

diff --git a/CHANGES b/CHANGES
index 6f19f3dd0c49b479ac4b6e9e8b8dba5bc52c54d2..ae46d90282cf11d963dca74a95efaa72cdbb626d 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -46,6 +46,7 @@
 - ext:
   - added distinct() method to SelectResults.  generally should only make a difference
   when using count().
+  - added options() method to SelectResults, equivalent to query.options() [ticket:472]
   - added optional __table_opts__ dictionary to ActiveMapper, will send kw options to 
   Table objects [ticket:462]
 - mssql:
index 5ad961f0ad27c5ff75a79ee4eacc0e314eb1b82d..eab2aa688dd96e69692f4e85c5e8cd2a75f0c9e5 100644 (file)
@@ -27,6 +27,14 @@ class SelectResults(object):
         self._ops.update(ops)
         self._joinpoint = joinpoint or (self._query.table, self._query.mapper)
 
+    def options(self,*args, **kwargs):
+        """transform the original mapper query form to an alternate form
+
+        See also Query.options
+
+        """
+        self._query = self._query.options(*args, **kwargs)
+
     def count(self):
         """executes the SQL count() function against the SelectResults criterion."""
         return self._query.count(self._clause, **self._ops)