跳转到主要内容

解释使用Datasette执行的SQL查询

项目描述

datasette-explain

PyPI Changelog Tests License

解释使用Datasette执行的SQL查询

安装

在Datasette相同的环境中安装此插件。

datasette install datasette-explain

用法

该插件向查询编辑页面添加JavaScript,该JavaScript会不断更新页面,显示从运行EXPLAIN QUERY PLAN查询中获取的信息。

这可能会导致错误消息,或者它可能显示查询计划以及查询使用的任何表。

演示

您可以在 datasette.simonwillison.net 上看到此插件的功能。

Demo of this plugin - a SQL query shows the explain plan as well as the three tables that were used in the query (their names and columns)

开发

要本地设置此插件,首先检出代码。然后创建一个新的虚拟环境

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

现在安装依赖项并测试依赖项

pip install -e '.[test]'

要运行测试

pytest

项目详情


下载文件

下载适合您平台的应用程序。如果您不确定选择哪个,请了解更多关于 安装包 的信息。

源分发

datasette-explain-0.2.1.tar.gz (8.7 kB 查看散列)

上传于 源文件

构建发行版

datasette_explain-0.2.1-py3-none-any.whl (8.6 kB 查看哈希值)

上传于 Python 3

支持者