mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Removed _group_count=col feature, closes #504
This commit is contained in:
parent
931bfc6661
commit
c30f07c58e
2 changed files with 0 additions and 21 deletions
|
|
@ -499,18 +499,6 @@ class TableView(RowTableShared):
|
|||
if order_by:
|
||||
order_by = "order by {} ".format(order_by)
|
||||
|
||||
# _group_count=col1&_group_count=col2
|
||||
group_count = special_args_lists.get("_group_count") or []
|
||||
if group_count:
|
||||
sql = 'select {group_cols}, count(*) as "count" from {table_name} {where} group by {group_cols} order by "count" desc limit 100'.format(
|
||||
group_cols=", ".join(
|
||||
'"{}"'.format(group_count_col) for group_count_col in group_count
|
||||
),
|
||||
table_name=escape_sqlite(table),
|
||||
where=where_clause,
|
||||
)
|
||||
return await self.custom_sql(request, database, hash, sql, editable=True)
|
||||
|
||||
extra_args = {}
|
||||
# Handle ?_size=500
|
||||
page_size = _size or request.raw_args.get("_size")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue