simonw / simonw/datasette

Mechanism for indicating foreign key relationships in the table and query page URLs

Open
#620 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement feature medium
Dominant language
Python
Stars
11.5k
Forks
903
Avg merge
4d 17h
Merged PRs (30d)
18

Description

Datasette currently only inflates foreign keys (into names hyperlinks) if it detects them as foreign key constraints in the underlying database.

It would be useful if you could specify additional "foreign keys" using both metadata.json and the querystring - similar time how you can pass ?_fts_table=x https://datasette.readthedocs.io/en/stable/full_text_search.html#configuring-full-text-search-for-a-table-or-view

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing foreign-key handling and the metadata.json and query-string configuration described in the issue. Compare it with the existing ?_fts_table=x behavior and the linked full-text-search documentation. Done means additional relationships can be declared through both metadata.json and the query string and are reflected in table and query page URLs.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, sqlite
Domain
backend, database
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.