]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Fix the count example in ORM migration doc (#9421)
authorGrey Li <withlihui@gmail.com>
Sat, 4 Mar 2023 17:51:50 +0000 (01:51 +0800)
committerGitHub <noreply@github.com>
Sat, 4 Mar 2023 17:51:50 +0000 (18:51 +0100)
doc/build/changelog/migration_20.rst

index d31ed5b02d6dd813445f0558328afbfa759c3417..1fe47b7ac1736f74062773f0258f6e555885a57c 100644 (file)
@@ -1518,16 +1518,16 @@ following the table, and may include additional notes not summarized here.
 
       - ::
 
-          session.scalars(
+          session.scalar(
             select(func.count()).
             select_from(User)
-          ).one()
+          )
 
           # or
           
-          session.scalars(
+          session.scalar(
             select(func.count(User.id))
-          ).one()
+          )
 
       - :meth:`_orm.Session.scalar`