You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduce new /$DB/-/query endpoint, soft replaces /$DB?sql=... (#2363)
* Introduce new default /$DB/-/query endpoint
* Fix a lot of tests
* Update pyodide test to use query endpoint
* Link to /fixtures/-/query in a few places
* Documentation for QueryView
---------
Co-authored-by: Simon Willison <[email protected]>
Copy file name to clipboardExpand all lines: docs/pages.rst
+15
Original file line number
Diff line number
Diff line change
@@ -55,6 +55,21 @@ The following tables are hidden by default:
55
55
- Tables relating to the inner workings of the SpatiaLite SQLite extension.
56
56
- ``sqlite_stat`` tables used to store statistics used by the query optimizer.
57
57
58
+
.. _QueryView:
59
+
60
+
Queries
61
+
=======
62
+
63
+
The ``/database-name/-/query`` page can be used to execute an arbitrary SQL query against that database, if the :ref:`permissions_execute_sql` permission is enabled. This query is passed as the ``?sql=`` query string parameter.
64
+
65
+
This means you can link directly to a query by constructing the following URL:
Each configured :ref:`canned query <canned_queries>` has its own page, at ``/database-name/query-name``. Viewing this page will execute the query and display the results.
70
+
71
+
In both cases adding a ``.json`` extension to the URL will return the results as JSON.
0 commit comments