- attached sqla_bug.py
incorrect docstring on Query.one()
Issue #873
resolved
According to the documentation for 0.4.1 class Query, method one() it states
Return the first result of this Query, raising an exception if more than one row exists.
It does not however say it should raise an exception if none exist.
This is either a documentation bug, or a programming bug depending on the desired functionality. Either way some clarifcation or correction is needed.
Comments (4)
-
Account Deleted -
repo owner - changed title to incorrect docstring on Query.one()
its a docstring typo. Heres the official tutorial at http://www.sqlalchemy.org/docs/04/ormtutorial.html :
and one(), applies a limit of two, and if not exactly one row returned (no more, no less), raises an error
-
-
repo owner - removed milestone
Removing milestone: 0.4.6 (automated comment)
- Log in to comment
Test Case