home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

2 rows where issue = 1551113681 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)

user 1

  • simonw · 2 ✖

issue 1

  • `datasette --version` should also show the SQLite version · 2 ✖

author_association 1

  • OWNER 2
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
1398768399 https://github.com/simonw/datasette/issues/1998#issuecomment-1398768399 https://api.github.com/repos/simonw/datasette/issues/1998 IC_kwDOBm6k_c5TX4MP simonw 9599 2023-01-20T18:19:06Z 2023-01-20T18:19:06Z OWNER

Simplest solution would be to ditch the version_option decorator and roll a custom option based on it instead, imitating what this code does:

https://github.com/pallets/click/blob/7586834cab38c5592d9d6de3ee0ebe75d4353bfb/src/click/decorators.py#L413-L524

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
`datasette --version` should also show the SQLite version 1551113681  
1398767813 https://github.com/simonw/datasette/issues/1998#issuecomment-1398767813 https://api.github.com/repos/simonw/datasette/issues/1998 IC_kwDOBm6k_c5TX4DF simonw 9599 2023-01-20T18:18:27Z 2023-01-20T18:18:27Z OWNER

Fell down a bit of a rabbit hole trying to figure out how to get Click's version_option() to evaluate a custom message. Got this far:

```python class _VersionMessage(UserString): @property def data(self): return "%(prog)s, version %(version)s (SQLite {})".format( sqlite3.connect(":memory:").execute("select sqlite_version()").fetchone()[0] )

@data.setter
def data(self, value):
    pass

@click.group(cls=DefaultGroup, default="serve", default_if_no_args=True) @click.version_option(version=version, message=_VersionMessage("")) def cli(): """ Datasette is an open source multi-tool for exploring and publishing data

\b
About Datasette: https://datasette.io/
Full documentation: https://docs.datasette.io/
"""

``` But now:

% datasette --version %(prog)s, version %(version)s (SQLite 3.40.1)

I was trying to avoid running that select sqlite_version() thing unless the --version option was used.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
`datasette --version` should also show the SQLite version 1551113681  

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