home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 737402392

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions issue performed_via_github_app
https://github.com/simonw/datasette/issues/942#issuecomment-737402392 https://api.github.com/repos/simonw/datasette/issues/942 737402392 MDEyOklzc3VlQ29tbWVudDczNzQwMjM5Mg== 9599 2020-12-02T18:08:55Z 2020-12-02T18:08:55Z OWNER

SQLite does let you add comments in your CREATE TABLE statements: sql CREATE TABLE something ( id integer primary key, -- integer primary key created text -- created date as ISO datetime ); But the only mechanism for reading those back is to retrieve that CREATE TABLE block of SQL from the sqlite_master table and run a parser against it.

I've so far resisted adding a SQL syntax parser to Datasette for complexity reasons - though I'm increasingly thinking I'll need to do it at some point.

I think I'll leave this to plugins. I'm definitely going to build a plugin that lets you store metadata for tables and columns in a SQLite database table, which will then support interactively editing metadata through a UI.

A plugin which extracts column comments from the SQLite CREATE TABLE comments would be feasible too, if I design the plugin hooks well.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
681334912  
Powered by Datasette · Queries took 0.937ms · About: github-to-sqlite