home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where author_association = "OWNER", issue = 1879209560 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 · 3 ✖

issue 1

  • Mechanism for de-registering registered SQL 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
1704384393 https://github.com/simonw/sqlite-utils/issues/589#issuecomment-1704384393 https://api.github.com/repos/simonw/sqlite-utils/issues/589 IC_kwDOCGYnMM5llteJ simonw 9599 2023-09-03T19:36:34Z 2023-09-03T19:36:34Z OWNER

Here's a prototype: https://github.com/simonw/sqlite-utils/commit/62f673835c4a66f87cf6f949eaff43c8b014619b

Still needs tests and documentation (and some more thought to make sure it's doing the right thing).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Mechanism for de-registering registered SQL functions 1879209560  
1704384111 https://github.com/simonw/sqlite-utils/issues/589#issuecomment-1704384111 https://api.github.com/repos/simonw/sqlite-utils/issues/589 IC_kwDOCGYnMM5lltZv simonw 9599 2023-09-03T19:35:03Z 2023-09-03T19:35:03Z OWNER

Normally in Python/sqlite3 you de-register a function by passing None to it.

You can't do that with db.register_function() at the moment because a fn of None does something else:

https://github.com/simonw/sqlite-utils/blob/1260bdc7bfe31c36c272572c6389125f8de6ef71/sqlite_utils/db.py#L461-L464

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Mechanism for de-registering registered SQL functions 1879209560  
1704383901 https://github.com/simonw/sqlite-utils/issues/589#issuecomment-1704383901 https://api.github.com/repos/simonw/sqlite-utils/issues/589 IC_kwDOCGYnMM5lltWd simonw 9599 2023-09-03T19:34:05Z 2023-09-03T19:34:05Z OWNER

For that particular case I realized I'd quite like to have a mechanism for applying functions for a block of code and then de-registering them at the end - a context manager.

I played with this idea a bit:

python with db.register_functions(md5, md5_random): db.query(...)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Mechanism for de-registering registered SQL functions 1879209560  

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