home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where author_association = "OWNER", issue = 1053122092 and user = 9599 sorted by updated_at descending

✖
✖
✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: updated_at (date)

user 1

  • simonw · 4 ✖

issue 1

  • `table.lookup()` option to populate additional columns when creating a record · 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
968450579 https://github.com/simonw/sqlite-utils/issues/339#issuecomment-968450579 https://api.github.com/repos/simonw/sqlite-utils/issues/339 IC_kwDOCGYnMM45uWIT simonw 9599 2021-11-15T02:02:34Z 2021-11-15T02:02:34Z OWNER

Documentation: https://github.com/simonw/sqlite-utils/blob/54a2269e91ce72b059618662ed133a85f3d42e4a/docs/python-api.rst#working-with-lookup-tables

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
`table.lookup()` option to populate additional columns when creating a record 1053122092  
968435041 https://github.com/simonw/sqlite-utils/issues/339#issuecomment-968435041 https://api.github.com/repos/simonw/sqlite-utils/issues/339 IC_kwDOCGYnMM45uSVh simonw 9599 2021-11-15T01:44:42Z 2021-11-15T01:44:42Z OWNER

lookup(column_values, extra_values) is one option.

column_values isn't actually a great name for the first parameter any more, since the second parameter also takes column values. The first parameter is now all about the unique lookup values.

Maybe this:

lookup(lookup_values, extra_values)
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
`table.lookup()` option to populate additional columns when creating a record 1053122092  
968434594 https://github.com/simonw/sqlite-utils/issues/339#issuecomment-968434594 https://api.github.com/repos/simonw/sqlite-utils/issues/339 IC_kwDOCGYnMM45uSOi simonw 9599 2021-11-15T01:43:10Z 2021-11-15T01:43:10Z OWNER

What should I call this parameter? Django has a similar feature where it calls them defaults= (for get_or_create()) but I'm not a huge fan of that name.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
`table.lookup()` option to populate additional columns when creating a record 1053122092  
968434425 https://github.com/simonw/sqlite-utils/issues/339#issuecomment-968434425 https://api.github.com/repos/simonw/sqlite-utils/issues/339 IC_kwDOCGYnMM45uSL5 simonw 9599 2021-11-15T01:42:36Z 2021-11-15T01:42:36Z OWNER

Here's the current signature of table.lookup(): https://github.com/simonw/sqlite-utils/blob/9cda5b070f885a7995f0c307bcc4f45f0812994a/sqlite_utils/db.py#L2716-L2729

I'm going to add a second positional argument which can provide a dictionary of column->value to use when creating the original table and populating the initial row. If the row already exists, those columns will be ignored entirely.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
`table.lookup()` option to populate additional columns when creating a record 1053122092  

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