Skip to content

Commit

Permalink
More comments in TableView.data(), refs #1518
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Dec 16, 2021
1 parent 2c07327 commit 0663d55
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion datasette/views/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,8 @@ async def data(

table_metadata = self.ds.table_metadata(database, table)
units = table_metadata.get("units", {})

# Build where clauses from query string arguments
filters = Filters(sorted(other_args), units, ureg)
where_clauses, params = filters.build_where_clauses(table)

Expand Down Expand Up @@ -584,7 +586,7 @@ async def data(

count_sql = f"select count(*) {from_sql}"

# Handl pagination driven by ?_next=
# Handle pagination driven by ?_next=
_next = _next or special_args.get("_next")
offset = ""
if _next:
Expand Down

0 comments on commit 0663d55

Please sign in to comment.