From a6094d6682c956ce8a77fbec2a2700f901f3e75e Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Tue, 8 Jan 2019 17:46:55 -0500 Subject: use ..deprecated directive w/ version in all cases These changes should be ported from 1.3 back to 1.0 or possibly 0.9 to the extent they are relevant in each version. In 1.3 we hope to turn all deprecation documentation into warnings. Change-Id: I205186cde161af9389af513a425c62ce90dd54d8 --- lib/sqlalchemy/sql/functions.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'lib/sqlalchemy/sql/functions.py') diff --git a/lib/sqlalchemy/sql/functions.py b/lib/sqlalchemy/sql/functions.py index e191cff15..9aea031f9 100644 --- a/lib/sqlalchemy/sql/functions.py +++ b/lib/sqlalchemy/sql/functions.py @@ -756,6 +756,22 @@ class count(GenericFunction): r"""The ANSI COUNT aggregate function. With no arguments, emits COUNT \*. + E.g.:: + + from sqlalchemy import func + from sqlalchemy import select + from sqlalchemy import table, column + + my_table = table('some_table', column('id')) + + stmt = select([func.count()]).select_from(my_table) + + Executing ``stmt`` would emit:: + + SELECT count(*) AS count_1 + FROM some_table + + """ type = sqltypes.Integer -- cgit v1.2.1