Permalink
Browse files

Adding docs for first()

  • Loading branch information...
1 parent 486a08c commit 96bfaa88d26d3cee022b4f254947e4b1b1d9ac0a @coleifer committed Jan 25, 2013
Showing with 7 additions and 0 deletions.
  1. +7 −0 docs/peewee/api.rst
View
@@ -939,6 +939,13 @@ Query Types
>>> user = User.get(User.active == True, User.username == username)
+ .. py:method:: first()
+
+ :rtype: :py:class:`Model` instance or ``None`` if no results
+
+ Fetch the first row from a query. The result will be cached in case the entire
+ query result-set should be iterated later.
+
.. py:method:: execute()
:rtype: :py:class:`QueryResultWrapper`

0 comments on commit 96bfaa8

Please sign in to comment.