mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Don't explain an explain even in the demo, refs #2293
This commit is contained in:
parent
5de6797d4a
commit
4d24bf6b34
3 changed files with 13 additions and 8 deletions
|
|
@ -1557,7 +1557,10 @@ This example adds a new query action linking to a page for explaining a query:
|
|||
|
||||
|
||||
@hookimpl
|
||||
def query_actions(datasette, database, sql):
|
||||
def query_actions(datasette, database, query_name, sql):
|
||||
# Don't explain an explain
|
||||
if sql.lower().startswith("explain"):
|
||||
return
|
||||
return [
|
||||
{
|
||||
"href": datasette.urls.database(database)
|
||||
|
|
@ -1571,7 +1574,6 @@ This example adds a new query action linking to a page for explaining a query:
|
|||
},
|
||||
]
|
||||
|
||||
|
||||
.. _plugin_hook_database_actions:
|
||||
|
||||
database_actions(datasette, actor, database, request)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue