Skip to content

Commit

Permalink
switch .first() to .scalar() for querying single record (#1116)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidism committed Oct 6, 2022
2 parents 4dc5cfe + 0afc961 commit 451a29a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ Remember to call ``db.session.commit()`` after modifying, adding, or deleting an
``db.session.execute(db.select(...))`` constructs a query to select data from the
database. Building queries is the main feature of SQLAlchemy, so you'll want to read its
`tutorial on select`_ to learn all about it. You'll usually use the ``Result.scalars()``
method to get a list of results, or the ``Result.first()`` method to get a single
method to get a list of results, or the ``Result.scalar()`` method to get a single
result.

.. _tutorial on select: https://docs.sqlalchemy.org/tutorial/data_select.html
Expand Down

0 comments on commit 451a29a

Please sign in to comment.