home / github

Menu
  • Search all tables
  • GraphQL API

issues

Table actions
  • GraphQL API for issues

6 rows where assignee is not blank, milestone is not blank and state = "closed" sorted by updated_at descending

✖
✖
✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

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

type 2

  • issue 4
  • pull 2

state 1

  • closed · 6 ✖

repo 1

  • datasette 6
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
456568880 MDU6SXNzdWU0NTY1Njg4ODA= 509 Support opening multiple databases with the same stem simonw 9599 closed 0 simonw 9599 Datasette 1.0 3268330 4 2019-06-15T19:32:00Z 2020-12-22T20:04:35Z 2020-12-22T20:04:35Z OWNER  

e.g. I should be able to do this:

datasette App/data.db Other_App/data.db

This currently errors because you can't have two databases taking the /data URL path.

Instead, how about in this particular case assigning the second database /data-1?

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/509/reactions",
    "total_count": 2,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
717746043 MDExOlB1bGxSZXF1ZXN0NTAwMjU2NDg1 1000 datasette.client internal requests mechanism simonw 9599 closed 0 simonw 9599 Datasette 0.50 5971510 18 2020-10-08T23:58:25Z 2020-10-09T16:11:26Z 2020-10-09T16:11:25Z OWNER simonw/datasette/pulls/1000

Refs #943

datasette 107914493 pull    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/1000/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
453829910 MDU6SXNzdWU0NTM4Mjk5MTA= 505 Add white-space: pre-wrap to SQL create statement simonw 9599 closed 0 simonw 9599 Datasette 0.29 4471010 0 2019-06-08T19:59:56Z 2019-07-07T20:26:55Z 2019-07-07T20:26:55Z OWNER  

Right now a super-long CREATE TABLE statement causes the table page to be even wider than the table itself:

Adding white-space: pre-wrap to that <pre> element is an easy fix:

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/505/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
459587155 MDExOlB1bGxSZXF1ZXN0MjkwODk3MTA0 518 Port Datasette from Sanic to ASGI + Uvicorn simonw 9599 closed 0 simonw 9599 Datasette 1.0 3268330 12 2019-06-23T15:18:42Z 2019-06-24T13:42:50Z 2019-06-24T03:13:09Z OWNER simonw/datasette/pulls/518

Most of the code here was fleshed out in comments on #272 (Port Datasette to ASGI) - this pull request will track the final pieces:

  • [x] Update test harness to more correctly simulate the raw_path issue
  • [x] Use raw_path so table names containing / can work correctly
  • [x] Bug: JSON not served with correct content-type
  • [x] Get ?_trace=1 working again
  • [x] Replacement for @app.listener("before_server_start")
  • [x] Bug: /fixtures/table%2Fwith%2Fslashes.csv?_format=json downloads as CSV
  • [x] Replace Sanic request and response objects with my own classes, so I can remove Sanic dependency
  • [x] Final code tidy-up before merging to master
datasette 107914493 pull    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/518/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
0  
324188953 MDU6SXNzdWUzMjQxODg5NTM= 272 Port Datasette to ASGI simonw 9599 closed 0 simonw 9599 Datasette 1.0 3268330 42 2018-05-17T21:16:32Z 2019-06-24T04:54:15Z 2019-06-24T03:33:06Z OWNER  

Datasette doesn't take much advantage of Sanic, and I'm increasingly having to work around parts of it because of idiosyncrasies that are specific to Datasette - caring about the exact order of querystring arguments for example.

Since Datasette is GET-only our needs from a web framework are actually pretty slim.

This becomes more important as I expand the plugins #14 framework. Am I sure I want the plugin ecosystem to depend on a Sanic if I might move away from it in the future?

If Datasette wasn't all about async/await I would use WSGI, but today it makes more sense to use ASGI. I'd like to be confident that switching to ASGI would still give me the excellent performance that Sanic provides.

https://github.com/django/asgiref/blob/master/specs/asgi.rst

datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/272/reactions",
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed
267759136 MDU6SXNzdWUyNjc3NTkxMzY= 20 Config file with support for defining canned queries simonw 9599 closed 0 simonw 9599 Custom templates edition 2949431 9 2017-10-23T17:53:06Z 2017-12-05T19:05:35Z 2017-12-05T17:44:09Z OWNER  

Probably using YAML because then we get support for multiline strings:

bats:
  db: bats.sqlite3
  name: "Bat sightings"
  queries:
    specific_row: |
      select * from Bats
      where a = 1;
datasette 107914493 issue    
{
    "url": "https://api.github.com/repos/simonw/datasette/issues/20/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed

Advanced export

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

CSV options:

CREATE TABLE [issues] (
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [number] INTEGER,
   [title] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [state] TEXT,
   [locked] INTEGER,
   [assignee] INTEGER REFERENCES [users]([id]),
   [milestone] INTEGER REFERENCES [milestones]([id]),
   [comments] INTEGER,
   [created_at] TEXT,
   [updated_at] TEXT,
   [closed_at] TEXT,
   [author_association] TEXT,
   [pull_request] TEXT,
   [body] TEXT,
   [repo] INTEGER REFERENCES [repos]([id]),
   [type] TEXT
, [active_lock_reason] TEXT, [performed_via_github_app] TEXT, [reactions] TEXT, [draft] INTEGER, [state_reason] TEXT);
CREATE INDEX [idx_issues_repo]
                ON [issues] ([repo]);
CREATE INDEX [idx_issues_milestone]
                ON [issues] ([milestone]);
CREATE INDEX [idx_issues_assignee]
                ON [issues] ([assignee]);
CREATE INDEX [idx_issues_user]
                ON [issues] ([user]);
Powered by Datasette · Queries took 1012.297ms · About: github-to-sqlite
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows