mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Named canned queries can now be defined in metadata.json like this:
{
"databases": {
"timezones": {
"queries": {
"timezone_for_point": "select tzid from timezones ..."
}
}
}
}
These will be shown in a new "Queries" section beneath "Views" on the database page.
As part of this, I refactored the logic for the database index page. It used
to combine the functionality for listing available tables and the
functionality for executing custom SQL queries in a single template and view.
I have split that template out into database.html and query.html and reworked
the view to more clearly separate the custom SQL executing code.
Refs #20
|
||
|---|---|---|
| .. | ||
| static | ||
| templates | ||
| __init__.py | ||
| app.py | ||
| cli.py | ||
| utils.py | ||
| version.py | ||