From 15a9aad96232dd3353084453a8789dbd714c33b7 Mon Sep 17 00:00:00 2001 From: Grey Li Date: Sun, 5 Mar 2023 01:51:50 +0800 Subject: [PATCH] Fix the count example in ORM migration doc (#9421) --- doc/build/changelog/migration_20.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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` -- 2.47.2