Skip to content

Commit

Permalink
Comment on my ambivalence about db.one
Browse files Browse the repository at this point in the history
  • Loading branch information
chadwhitacre committed Aug 10, 2013
1 parent 325abc6 commit 0a258b7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,11 @@ def one_or_zero(self, sql, parameters=None):


def one(self, sql, parameters=None, strict=None):

# I'm half-considering dropping this. Now that one_or_zero exists, this
# is really only useful for what should really be called db.first, and
# in that case why aren't you using a LIMIT 1?

"""Execute a query and return a single result.
:param unicode sql: the SQL statement to execute
Expand Down

0 comments on commit 0a258b7

Please sign in to comment.