Entirely removed table_rows_count table property

We were not displaying this anywhere, and it is now expensive to calculate.

Refs #419, #420
This commit is contained in:
Simon Willison 2019-05-01 22:29:47 -07:00
commit efc93b8ab5
4 changed files with 0 additions and 10 deletions

View file

@ -317,12 +317,7 @@ class TableView(RowTableShared):
)
params["search_{}".format(i)] = search_text
table_rows_count = None
sortable_columns = set()
if not is_view:
table_rows_count = (await self.ds.execute(
database, "select count(*) from {}".format(escape_sqlite(table))
)).rows[0][0]
sortable_columns = await self.sortable_columns_for_table(database, table, use_rowid)
@ -760,7 +755,6 @@ class TableView(RowTableShared):
"human_description_en": human_description_en,
"rows": rows[:page_size],
"truncated": results.truncated,
"table_rows_count": table_rows_count,
"filtered_table_rows_count": filtered_table_rows_count,
"expanded_columns": expanded_columns,
"expandable_columns": expandable_columns,