summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/ext/selectresults.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2007-02-10 23:41:56 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2007-02-10 23:41:56 +0000
commitace7e3a4f19f145c390f124f6ea382ca2809bbe3 (patch)
treed44c314b5fa12d3618507ca8f4618f47f87f56a6 /lib/sqlalchemy/ext/selectresults.py
parent1da55184e52ae6698ab02c368a43b0c037b17049 (diff)
downloadsqlalchemy-ace7e3a4f19f145c390f124f6ea382ca2809bbe3.tar.gz
- added options() method to SelectResults, equivalent to query.options() [ticket:472]
Diffstat (limited to 'lib/sqlalchemy/ext/selectresults.py')
-rw-r--r--lib/sqlalchemy/ext/selectresults.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/sqlalchemy/ext/selectresults.py b/lib/sqlalchemy/ext/selectresults.py
index 5ad961f0a..eab2aa688 100644
--- a/lib/sqlalchemy/ext/selectresults.py
+++ b/lib/sqlalchemy/ext/selectresults.py
@@ -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)