home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

8 rows where "updated_at" is on date 2020-12-22 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: issue_url, reactions, created_at (date), updated_at (date)

issue 4

  • Efficiently calculate list of databases/tables a user can view 3
  • Support opening multiple databases with the same stem 2
  • Better internal database_name for _internal database 2
  • Support linking to compound foreign keys 1

user 1

  • simonw 8

author_association 1

  • OWNER 8
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
748206874 https://github.com/simonw/datasette/issues/1152#issuecomment-748206874 https://api.github.com/repos/simonw/datasette/issues/1152 MDEyOklzc3VlQ29tbWVudDc0ODIwNjg3NA== simonw 9599 2020-12-18T17:03:00Z 2020-12-22T23:58:04Z OWNER

Another permissions thought: what if ALL Datasette permissions were default-deny, and plugins could only grant permission to things, not block permission?

Right now a plugin can reply False to block, True to allow or None for "I have no opinion on this, ask someone else" - but even I'm confused by the interactions between block and allow and I implemented the system!

If everything in Datasette was default-deny then the user could use --public-view as an option when starting the server to default-allow view actions.

More importantly: plugins could return SQL statements that select a list of databases/tables the user is allowed access to. These could then be combined with UNION to create a full list of available resources.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Efficiently calculate list of databases/tables a user can view 770598024  
747920515 https://github.com/simonw/datasette/issues/1152#issuecomment-747920515 https://api.github.com/repos/simonw/datasette/issues/1152 MDEyOklzc3VlQ29tbWVudDc0NzkyMDUxNQ== simonw 9599 2020-12-18T07:29:21Z 2020-12-22T23:57:29Z OWNER

Could I solve this using a configured canned query against the _internal tables with the actor's properties as inputs?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Efficiently calculate list of databases/tables a user can view 770598024  
749771231 https://github.com/simonw/datasette/issues/1099#issuecomment-749771231 https://api.github.com/repos/simonw/datasette/issues/1099 MDEyOklzc3VlQ29tbWVudDc0OTc3MTIzMQ== simonw 9599 2020-12-22T20:54:25Z 2020-12-22T20:54:25Z OWNER

https://latest.datasette.io/_internal/foreign_keys (use https://latest.datasette.io/login-as-root first) is now a compound foreign key table: sql CREATE TABLE foreign_keys ( "database_name" TEXT, "table_name" TEXT, "id" INTEGER, "seq" INTEGER, "table" TEXT, "from" TEXT, "to" TEXT, "on_update" TEXT, "on_delete" TEXT, "match" TEXT, PRIMARY KEY (database_name, table_name, id, seq), FOREIGN KEY (database_name) REFERENCES databases(database_name), FOREIGN KEY (database_name, table_name) REFERENCES tables(database_name, table_name) ); Currently the database_name column becomes a link (because it's a single foreign key) but the table_name one remains a non-link:

My original idea for compound foreign keys was to turn both of those columns into links, but that doesn't fit here because database_name is already part of a different foreign key.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Support linking to compound foreign keys 743371103  
749750995 https://github.com/simonw/datasette/issues/1152#issuecomment-749750995 https://api.github.com/repos/simonw/datasette/issues/1152 MDEyOklzc3VlQ29tbWVudDc0OTc1MDk5NQ== simonw 9599 2020-12-22T20:05:30Z 2020-12-22T20:05:30Z OWNER

1150 is landed now, which means there's a new, hidden _internal SQLite in-memory database containing all of the tables and databases.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Efficiently calculate list of databases/tables a user can view 770598024  
749749948 https://github.com/simonw/datasette/issues/509#issuecomment-749749948 https://api.github.com/repos/simonw/datasette/issues/509 MDEyOklzc3VlQ29tbWVudDc0OTc0OTk0OA== simonw 9599 2020-12-22T20:03:10Z 2020-12-22T20:03:10Z OWNER

If you open multiple files with the same filename, e.g. like this:

datasette fixtures.db templates/fixtures.db plugins/fixtures.db

You'll now get this:

{
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 1,
    "rocket": 0,
    "eyes": 0
}
Support opening multiple databases with the same stem 456568880  
749738241 https://github.com/simonw/datasette/issues/509#issuecomment-749738241 https://api.github.com/repos/simonw/datasette/issues/509 MDEyOklzc3VlQ29tbWVudDc0OTczODI0MQ== simonw 9599 2020-12-22T19:38:14Z 2020-12-22T19:38:14Z OWNER

I'm fixing this in #1155.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Support opening multiple databases with the same stem 456568880  
749723557 https://github.com/simonw/datasette/issues/1155#issuecomment-749723557 https://api.github.com/repos/simonw/datasette/issues/1155 MDEyOklzc3VlQ29tbWVudDc0OTcyMzU1Nw== simonw 9599 2020-12-22T19:08:27Z 2020-12-22T19:08:27Z OWNER

I'm going to have the .add_database() method select the name used in the path, de-duping against any existing names. It will then set database.name to that so that the database has access to its own name.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Better internal database_name for _internal database 771216293  
748356492 https://github.com/simonw/datasette/issues/1155#issuecomment-748356492 https://api.github.com/repos/simonw/datasette/issues/1155 MDEyOklzc3VlQ29tbWVudDc0ODM1NjQ5Mg== simonw 9599 2020-12-18T22:49:32Z 2020-12-22T01:13:05Z OWNER

There's some messy code that needs fixing here. The datasette.databases dictionary right now has a key that corresponds to the /_internal URL in the path, and a value that's a Database() object. BUT... the Database() object doesn't know what its key is.

While fixing this I should fix the issue where Datasette gets confused by multiple databases with the same stem: https://github.com/simonw/datasette/issues/509

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Better internal database_name for _internal database 771216293  

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
, [performed_via_github_app] TEXT);
CREATE INDEX [idx_issue_comments_issue]
                ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
                ON [issue_comments] ([user]);
Powered by Datasette · Queries took 496.589ms · About: github-to-sqlite