mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
"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:
parent
ce09e5d2d3
commit
c0d1b4c322
4 changed files with 58 additions and 130 deletions
|
|
@ -7,7 +7,7 @@ SQLite includes `a powerful mechanism for enabling full-text search <https://www
|
|||
|
||||
.. image:: full_text_search.png
|
||||
|
||||
Datasette detects which tables have been configured for full-text search when it first inspects the database on startup (or via the ``datasette inspect`` command). You can visit the ``/-/inspect`` page on your Datasette instance to see the results of this inspection. Tables that have been configured for full-text search will have their ``fts_table`` property set to the name of another table (tables without full-text search will have this property set to ``null``).
|
||||
Datasette automatically detects which tables have been configured for full-text search.
|
||||
|
||||
FTS versions
|
||||
------------
|
||||
|
|
@ -71,6 +71,8 @@ And then populate it like this:
|
|||
|
||||
You can use this technique to populate the full-text search index from any combination of tables and joins that makes sense for your project.
|
||||
|
||||
The `sqlite-utils tool <https://sqlite-utils.readthedocs.io/en/latest/cli.html#configuring-full-text-search>`__ provides a command-line mechanism that can be used to implement the above steps.
|
||||
|
||||
.. _full_text_search_table_or_view:
|
||||
|
||||
Configuring full-text search for a table or view
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue