summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/selectable.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/sql/selectable.py')
-rw-r--r--lib/sqlalchemy/sql/selectable.py30
1 files changed, 0 insertions, 30 deletions
diff --git a/lib/sqlalchemy/sql/selectable.py b/lib/sqlalchemy/sql/selectable.py
index a0df45b52..595b1bdfa 100644
--- a/lib/sqlalchemy/sql/selectable.py
+++ b/lib/sqlalchemy/sql/selectable.py
@@ -365,36 +365,6 @@ class FromClause(roles.AnonymizedFromClauseRole, Selectable):
_use_schema_map = False
- @util.deprecated(
- "1.1",
- message="The :meth:`.FromClause.count` method is deprecated, "
- "and will be removed in a future release. Please use the "
- ":class:`.functions.count` function available from the "
- ":attr:`.func` namespace.",
- )
- @util.preload_module("sqlalchemy.sql.functions")
- def count(self, whereclause=None, **params):
- """return a SELECT COUNT generated against this
- :class:`.FromClause`.
-
- .. seealso::
-
- :class:`.functions.count`
-
- """
- functions = util.preloaded.sql_functions
- if self.primary_key:
- col = list(self.primary_key)[0]
- else:
- col = list(self.columns)[0]
- return Select._create_select_from_fromclause(
- self,
- [functions.func.count(col).label("tbl_row_count")],
- whereclause,
- from_obj=[self],
- **params
- )
-
def select(self, whereclause=None, **params):
"""return a SELECT of this :class:`.FromClause`.