home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where "updated_at" is on date 2022-07-02 and user = 9599 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

issue 3

  • Configuration directory mode does not pick up other file extensions than .db 1
  • sqlite-utils convert date parsing recipe complains about trying to parse "*" 1
  • Utilities for duplicating tables and creating a table with the results of a query 1

user 1

  • simonw · 3 ✖

author_association 1

  • OWNER 3
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
1172970910 https://github.com/simonw/datasette/issues/1646#issuecomment-1172970910 https://api.github.com/repos/simonw/datasette/issues/1646 IC_kwDOBm6k_c5F6h2e simonw 9599 2022-07-02T22:13:13Z 2022-07-02T22:17:16Z OWNER

Adding .sqlite3 to this feature makes sense to me.

I don't think it's worth having a --extensión option - it's possible right now to write a Datasette plugin that loads additional databases on startup, there's an example of how to do that in the source code for https://github.com/simonw/datasette-upload-dbs

Here: https://github.com/simonw/datasette-upload-dbs/blob/81510ef4f0004371a3adda18100936b430535cc1/datasette_upload_dbs/init.py#L41-L50

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Configuration directory mode does not pick up other file extensions than .db 1157182254  
1172903355 https://github.com/simonw/sqlite-utils/issues/427#issuecomment-1172903355 https://api.github.com/repos/simonw/sqlite-utils/issues/427 IC_kwDOCGYnMM5F6RW7 simonw 9599 2022-07-02T13:59:30Z 2022-07-02T13:59:30Z OWNER

This should work to avoid that:

sqlite-utils convert \
  ${dbfile} details dob \
  'r.parsedate(value)' \
  --where "dob != '*'"
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
sqlite-utils convert date parsing recipe complains about trying to parse "*" 1212701569  
1172902594 https://github.com/simonw/sqlite-utils/issues/449#issuecomment-1172902594 https://api.github.com/repos/simonw/sqlite-utils/issues/449 IC_kwDOCGYnMM5F6RLC simonw 9599 2022-07-02T13:55:51Z 2022-07-02T13:55:51Z OWNER

I like the idea of this as a feature - design could look like this:

db["my_table"].duplicate("new_table")

Then for the CLI tool:

sqlite-utils duplicate data.db my_table new_table

Additional features that might be useful:

  • Duplicate across connection aliases - so you can copy a table to another database using the duplicate method or command
  • Ability to execute an arbitrary SQL query and save the results to a new table - basically a wrapper around CREATE TABLE t AS SELECT ..., again with alias support for copying to another database
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Utilities for duplicating tables and creating a table with the results of a query 1279863844  

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 560.903ms · About: github-to-sqlite