"datasette inspect foo.db" now just calculates table counts

Refs #462

* inspect command now just outputs table counts
* test_inspect.py is now only tests for that CLI command
* Updated some relevant documentation
* Removed docs for /-/inspect since that is about to change
This commit is contained in:
Simon Willison 2019-05-11 14:36:57 -07:00
commit c0d1b4c322
4 changed files with 58 additions and 130 deletions

View file

@ -21,40 +21,6 @@ Shows the contents of the ``metadata.json`` file that was passed to ``datasette
"databases": {...}
}
.. _JsonDataView_inspect:
/-/inspect
----------
Shows the result of running ``datasette inspect`` on the currently loaded databases. This is run automatically when Datasette starts up, or can be run as a separate step and passed to ``datasette serve --inspect-file``.
This is an internal implementation detail of Datasette and the format should not be considered stable - it is likely to change in undocumented ways between different releases.
`Inspect example <https://fivethirtyeight.datasettes.com/-/inspect>`_::
{
"fivethirtyeight": {
"file": "fivethirtyeight.db",
"hash": "5de27e3eceb3f5ba817e0b2e066cea77832592b62d94690b5102a48f385b95fb",
"tables": {
"./index": {
"columns": [
"dataset_url",
"article_url",
"live"
],
"count": 125,
"foreign_keys": {
"incoming": [],
"outgoing": []
},
"fts_table": null,
"hidden": false,
"name": "./index",
"primary_keys": []
},
...
.. _JsonDataView_versions:
/-/versions