home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where issue = 324162476 sorted by updated_at descending

✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 1

  • simonw 4

issue 1

  • Mechanism for automatically picking up changes when on-disk .db file changes · 4 ✖

author_association 1

  • OWNER 4
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
453262703 https://github.com/simonw/datasette/issues/271#issuecomment-453262703 https://api.github.com/repos/simonw/datasette/issues/271 MDEyOklzc3VlQ29tbWVudDQ1MzI2MjcwMw== simonw 9599 2019-01-10T21:35:18Z 2019-01-10T21:35:18Z OWNER

It turns out this was much easier to support than I expected: https://github.com/simonw/datasette/commit/eac08f0dfc61a99e8887442fc247656d419c76f8

{
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 1,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Mechanism for automatically picking up changes when on-disk .db file changes 324162476  
398133924 https://github.com/simonw/datasette/issues/271#issuecomment-398133924 https://api.github.com/repos/simonw/datasette/issues/271 MDEyOklzc3VlQ29tbWVudDM5ODEzMzkyNA== simonw 9599 2018-06-18T17:32:22Z 2018-06-18T17:32:22Z OWNER

As seen in #316 inspect is already taking a VERY long time to run against large (600GB) databases.

To get this working I may have to make inspect an optional optimization and run introspection for columns and primary keys in demand.

The one catch here is the count(*) queries - Datasette may need to learn not to return full table counts in circumstances where the count has not been pre-calculates and takes more than Xms to generate.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Mechanism for automatically picking up changes when on-disk .db file changes 324162476  
389989615 https://github.com/simonw/datasette/issues/271#issuecomment-389989615 https://api.github.com/repos/simonw/datasette/issues/271 MDEyOklzc3VlQ29tbWVudDM4OTk4OTYxNQ== simonw 9599 2018-05-17T19:56:13Z 2018-05-17T19:56:13Z OWNER

From https://www.sqlite.org/c3ref/open.html

immutable: The immutable parameter is a boolean query parameter that indicates that the database file is stored on read-only media. When immutable is set, SQLite assumes that the database file cannot be changed, even by a process with higher privilege, and so the database is opened read-only and all locking and change detection is disabled. Caution: Setting the immutable property on a database file that does in fact change can result in incorrect query results and/or SQLITE_CORRUPT errors. See also: SQLITE_IOCAP_IMMUTABLE.

So this would probably have to be a new mode, datasette serve --detect-db-changes, which no longer opens in immutable mode. Or maybe current behavior becomes not-the-default and you opt into it with datasette serve --immutable

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Mechanism for automatically picking up changes when on-disk .db file changes 324162476  
389989015 https://github.com/simonw/datasette/issues/271#issuecomment-389989015 https://api.github.com/repos/simonw/datasette/issues/271 MDEyOklzc3VlQ29tbWVudDM4OTk4OTAxNQ== simonw 9599 2018-05-17T19:54:10Z 2018-05-17T19:54:10Z OWNER

This is a departure from how Datasette has been designed so far, and it may turn out that it's not feasible or it requires too many philosophical changes to be worthwhile.

If we CAN do it though it would mean Datasette could stay running pointed at a directory on disk and new SQLite databases could be dropped into that directory by another process and served directly as they become available.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Mechanism for automatically picking up changes when on-disk .db file changes 324162476  

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 21.367ms · About: github-to-sqlite
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows