From 875487b8b78761dc162be55602da9b99bf0aca69 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Thu, 11 Mar 2010 18:46:21 -0500 Subject: [PATCH] formatting --- doc/build/ormtutorial.rst | 2 +- lib/sqlalchemy/orm/query.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/build/ormtutorial.rst b/doc/build/ormtutorial.rst index a3157781ac..f9ea28640b 100644 --- a/doc/build/ormtutorial.rst +++ b/doc/build/ormtutorial.rst @@ -873,7 +873,7 @@ Note that when :meth:`~sqlalchemy.orm.query.Query.join` is called with an explic session.query(Foo).join( Foo.bars, (Bat, bar.bats), - (Widget, (Bat.widget_id==Widget.id)) + (Widget, Bat.widget_id==Widget.id) ) The above would produce SQL something like ``foo JOIN bars ON JOIN bats ON JOIN widgets ON ``. diff --git a/lib/sqlalchemy/orm/query.py b/lib/sqlalchemy/orm/query.py index d7b60dfa3c..1b5bcb7fe4 100644 --- a/lib/sqlalchemy/orm/query.py +++ b/lib/sqlalchemy/orm/query.py @@ -1308,7 +1308,7 @@ class Query(object): def first(self): """Return the first result of this ``Query`` or - None if the result doesn't contain any row. + None if the result doesn't contain any row. first() applies a limit of one within the generated SQL, so that only one primary entity row is generated on the server side @@ -1360,8 +1360,8 @@ class Query(object): def scalar(self): """Return the first element of the first result or None - if no rows present. If multiple rows are returned, - raises MultipleResultsFound. + if no rows present. If multiple rows are returned, + raises MultipleResultsFound. >>> session.query(Item).scalar() @@ -1400,7 +1400,7 @@ class Query(object): def instances(self, cursor, __context=None): """Given a ResultProxy cursor as returned by connection.execute(), - return an ORM result as an iterator. + return an ORM result as an iterator. e.g.:: -- 2.47.3