issues: 273678673

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association pull_request body repo type active_lock_reason performed_via_github_app
273678673 MDU6SXNzdWUyNzM2Nzg2NzM= 85 Detect foreign keys and use them to link HTML pages together 9599 closed 0   2919870 6 2017-11-14T06:12:05Z 2017-11-19T06:08:19Z 2017-11-19T06:08:19Z OWNER  

https://stackoverflow.com/a/44430157/6083 documents the PRAGMA needed to extract foreign key references for a table.

At a minimum we can link column values known to be foreign keys to the corresponding row page.
We could try to summarize the linked row in some way too - somehow extracting a sensible link title, maybe based on additional configuration in the metadata.json file.

Still todo:

  • Fix it to csvs-to-sqlite refactoring command correctly creates primary key on generated tables
  • Ship new csvs-to-sqlite with refactoring command
  • Refactor column logic to be more predictable in our templates (the rowid special case)
  • Mechanism by which table metadata can specify the "label" column for a table
  • Automatically set the label column as the first column that isn't a primary key (falling back on primary key)
  • Code which runs a "select id, label from table where id in (...)" query as part of the tableview and populates a lookup dictionary
  • Modify templates to use values from that lookup dictionary
107914493 issue    

Links from other tables