home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 421971339

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 reactions draft state_reason
421971339 MDU6SXNzdWU0MjE5NzEzMzk= 420 Fix all the places that currently use .inspect() data 9599 closed 0   4305096 13 2019-03-17T20:54:37Z 2019-05-19T19:58:31Z 2019-05-02T01:13:46Z OWNER  

See #419: if Datasette is going to work against mutable SQLite files it can no longer assume that the .inspect() method will have cached the correct schema for all tables in all attached databases.

So everywhere in the code at the moment that relies on .inspect() data needs to be modified to use live introspection of the schema instead.

From a comment later on: here are the uses I need to fix as a checklist:

  • [x] table_exists()
  • [x] info["file"] in .execute()
  • [x] resolve_db_name()
  • [x] .database_url(database)
  • [x] DatabaseDownload file path
  • [x] sortable_columns_for_table() uses it to find the columns in a table
  • [x] expandable_columns() uses it to find foreign keys
  • [x] expand_foreign_keys() uses it to find foreign keys
  • [x] display_columns_and_rows() uses it to find primary keys and foreign keys... but also has access to a cursor.description which it uses to list the columns
  • [x] TableView.data uses it to lookup columns and primary keys and the table_rows_count (used if the thing isn't a view) and probably a few more things, this method is huge!
  • [x] RowView.data uses it for primary keys
  • [x] foreign_key_tables() uses it for foreign keys
  • [x] DatabaseView list of tables
  • [x] IndexView
107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/420/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed

Links from other tables

  • 0 rows from issues_id in issues_labels
  • 13 rows from issue in issue_comments
Powered by Datasette · Queries took 0.677ms · About: github-to-sqlite