From: Grey Li Date: Sat, 4 Mar 2023 17:51:50 +0000 (+0800) Subject: Fix the count example in ORM migration doc (#9421) X-Git-Tag: rel_2_0_5~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15a9aad96232dd3353084453a8789dbd714c33b7;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Fix the count example in ORM migration doc (#9421) --- diff --git a/doc/build/changelog/migration_20.rst b/doc/build/changelog/migration_20.rst index d31ed5b02d..1fe47b7ac1 100644 --- a/doc/build/changelog/migration_20.rst +++ b/doc/build/changelog/migration_20.rst @@ -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`