-
-
Notifications
You must be signed in to change notification settings - Fork 700
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to default to hiding the SQL for a canned query #1422
Comments
If you do this it should still be possible to view the SQL - which means we need a new parameter. I propose I think the configuration should use databases:
fixtures:
queries:
neighborhood_search:
hide_sql: true
sql: |-
select neighborhood, facet_cities.name, state
from facetable
join facet_cities on facetable.city_id = facet_cities.id
where neighborhood like '%' || :text || '%'
order by neighborhood
title: Search neighborhoods |
The logic for this is a little bit fiddly, due to the need to switch to using
|
Also need to consider this hidden field - it should pass the datasette/datasette/templates/query.html Lines 47 to 49 in acc2243
|
I'm working on a project with some HUGE (400+ lines of SQL) canned queries right now.
Any time you land on the canned query page you have to scroll down a long distance to get to the results!
Would be useful to be able to default to https://latest.datasette.io/fixtures/magic_parameters?_hide_sql=1 without needing the parameter.
The text was updated successfully, but these errors were encountered: