summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2007-12-09 17:50:24 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2007-12-09 17:50:24 +0000
commit120f13a500118dcbb453731f2b8e7b190b010040 (patch)
tree08ff611760ae2abdf2081bcfb398f170efb6717b /lib/sqlalchemy
parent4f5aa12547264fb6a2e2f3af58d02ff09949d302 (diff)
downloadsqlalchemy-120f13a500118dcbb453731f2b8e7b190b010040.tar.gz
add pydoc for from_statement().
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r--lib/sqlalchemy/orm/query.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/sqlalchemy/orm/query.py b/lib/sqlalchemy/orm/query.py
index 20f18eecb..89733d5e5 100644
--- a/lib/sqlalchemy/orm/query.py
+++ b/lib/sqlalchemy/orm/query.py
@@ -623,6 +623,19 @@ class Query(object):
def from_statement(self, statement):
+ """Execute the given SELECT statement and return results.
+
+ This method bypasses all internal statement compilation, and the
+ statement is executed without modification.
+
+ The statement argument is either a string, a ``select()`` construct,
+ or a ``text()`` construct, and should return the set of columns
+ appropriate to the entity class represented by this ``Query``.
+
+ Also see the ``instances()`` method.
+
+ """
+
if isinstance(statement, basestring):
statement = sql.text(statement)
q = self._clone()