home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where "created_at" is on date 2019-08-17 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

issue 3

  • More advanced connection pooling 2
  • Ability to list views, and to access db["view_name"].rows / rows_where / etc 1
  • Ability to introspect and run queries against views 1

user 1

  • simonw 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
522238222 https://github.com/simonw/datasette/issues/569#issuecomment-522238222 https://api.github.com/repos/simonw/datasette/issues/569 MDEyOklzc3VlQ29tbWVudDUyMjIzODIyMg== simonw 9599 2019-08-17T13:44:24Z 2019-08-17T13:45:10Z OWNER

Potential API design: python with pool.connection("fixtures") as conn: conn.set_time_limit(1000) conn.allow_all() conn.execute(...) Within this block the current thread has exclusive action to the connection - which has essentially been "checked out" from the pool. When the block ends that connection is made available to be checked out by other threads.

This could accept multiple database names for the case where I want to join across databases: python with pool.connection("fixtures", "dogs") as conn: conn.execute(...)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
More advanced connection pooling 481885279  
522238063 https://github.com/simonw/sqlite-utils/pull/55#issuecomment-522238063 https://api.github.com/repos/simonw/sqlite-utils/issues/55 MDEyOklzc3VlQ29tbWVudDUyMjIzODA2Mw== simonw 9599 2019-08-17T13:42:40Z 2019-08-17T13:42:40Z OWNER

I still need to implement the part of this where certain actions against views (like updating/inserting) are not allowed.

I think the better way to do that is to introduce a new class - View - rather than reusing the existing Table class - since there's a lot of stuff on Table (like primary key / foreign key introspection) which simply doesn't make sense for views.

This will get a bit more complicated - maybe I need both Table and View to extend a common subclass here?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Ability to introspect and run queries against views 481887482  
522236218 https://github.com/simonw/datasette/issues/569#issuecomment-522236218 https://api.github.com/repos/simonw/datasette/issues/569 MDEyOklzc3VlQ29tbWVudDUyMjIzNjIxOA== simonw 9599 2019-08-17T13:24:50Z 2019-08-17T13:24:50Z OWNER

I think what I want it a mechanism where a thread can say "give me a connection for database X" and it either gets back connection to X instantly OR a new connection to X is created and returned OR it blocks (because a certain number of connections to that database exist already) until another thread returns their connection OR it times out and returns an error.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
More advanced connection pooling 481885279  
522236053 https://github.com/simonw/sqlite-utils/issues/54#issuecomment-522236053 https://api.github.com/repos/simonw/sqlite-utils/issues/54 MDEyOklzc3VlQ29tbWVudDUyMjIzNjA1Mw== simonw 9599 2019-08-17T13:22:26Z 2019-08-17T13:22:26Z OWNER

Good catch: create_view() is an earlier utility method from before I started adding methods like db["table"].rows and .rows_where().

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Ability to list views, and to access db["view_name"].rows / rows_where / etc 480961330  

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