datasette-explain

Explain and validate SQL queries as you type them into Datasette

APACHE-2.0 License

Downloads
641
Stars
8
Committers
1

datasette-explain

Explain SQL queries executed using Datasette

Installation

Install this plugin in the same environment as Datasette.

datasette install datasette-explain

Usage

The plugin adds JavaScript to the query editor page which will constantly update the page with information gained from running EXPLAIN QUERY PLAN queries against the entered SQL.

This may result in an error message, or it may show the query plan along with any tables used by the query.

Demo

You can see this plugin in action on datasette.simonwillison.net.

Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:

cd datasette-explain
python3 -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests:

pytest
Package Rankings
Top 19.5% on Pypi.org
Badges
Extracted from project README
PyPI Changelog Tests License