Skip to content

Commit

Permalink
CLean up docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
coleifer committed Feb 10, 2015
1 parent 2c22c15 commit a997982
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/peewee/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1138,7 +1138,11 @@ Query Types
If the ``ForeignKeyField`` is ``nullable``, then a ``LEFT OUTER`` join
may need to be used::

User.select().join(Tweet, JOIN_LEFT_OUTER).annotate(Tweet)
query = (User
.select()
.join(Tweet, JOIN_LEFT_OUTER)
.switch(User) # Switch query context back to `User`.
.annotate(Tweet))

.. py:method:: aggregate(aggregation)
Expand Down
1 change: 1 addition & 0 deletions docs/peewee/querying.rst
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,7 @@ The resulting query will return *User* objects with all their normal attributes
query = (User
.select()
.join(Tweet, JOIN_LEFT_OUTER)
.switch(User)
.annotate(Tweet))
You can also specify a custom aggregator, such as *MIN* or *MAX*:
Expand Down

0 comments on commit a997982

Please sign in to comment.