home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where author_association = "OWNER" and issue = 1392690202 sorted by updated_at descending

✖
✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 1

  • simonw 3

issue 1

  • Support JSON values returned from .convert() functions · 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
1291159549 https://github.com/simonw/sqlite-utils/issues/495#issuecomment-1291159549 https://api.github.com/repos/simonw/sqlite-utils/issues/495 IC_kwDOCGYnMM5M9Yf9 simonw 9599 2022-10-25T21:23:01Z 2022-10-25T21:23:01Z OWNER

I've decided not to explicitly document this, since it's consistent with how other parts of the library work already.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Support JSON values returned from .convert() functions 1392690202  
1291152433 https://github.com/simonw/sqlite-utils/issues/495#issuecomment-1291152433 https://api.github.com/repos/simonw/sqlite-utils/issues/495 IC_kwDOCGYnMM5M9Wwx simonw 9599 2022-10-25T21:14:54Z 2022-10-25T21:14:54Z OWNER

There is a case where the function can return a dictionary at the moment: multi=True

python table.convert( "title", lambda v: {"upper": v.upper(), "lower": v.lower()}, multi=True ) But I think this change is still compatible with that. if you don't use multi=True then the return value will be stringified. If you DO use multi=True then something like this could work: python table.convert( "title", lambda v: {"upper": {"str": v.upper()}, "lower": {"str": v.lower()}}, multi=True ) This would result in a upper and lower column, each containing the JSON string {"str": "UPPERCASE"}.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Support JSON values returned from .convert() functions 1392690202  
1291149509 https://github.com/simonw/sqlite-utils/issues/495#issuecomment-1291149509 https://api.github.com/repos/simonw/sqlite-utils/issues/495 IC_kwDOCGYnMM5M9WDF simonw 9599 2022-10-25T21:12:11Z 2022-10-25T21:12:11Z OWNER

This makes sense to me. There are other places in the codebase where JSON is automatically stringified: https://github.com/simonw/sqlite-utils/blob/c7e4308e6f49d929704163531632e558f9646e4a/sqlite_utils/db.py#L2759-L2766

I don't see why the return value from a convert function shouldn't do the same thing.

Since this will result in previous errors working, I don't think it warrants a major version bump either.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Support JSON values returned from .convert() functions 1392690202  

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