home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

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

  • Idea: @db.register_function(deterministic=True) · 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
718170295 https://github.com/simonw/sqlite-utils/issues/191#issuecomment-718170295 https://api.github.com/repos/simonw/sqlite-utils/issues/191 MDEyOklzc3VlQ29tbWVudDcxODE3MDI5NQ== simonw 9599 2020-10-28T19:50:16Z 2020-10-28T19:50:16Z OWNER

I think I made a mistake when I designed the initial decorator. I should have had it work like this:

python @db.register_function() def reverse_string(s): return "".join(reversed(list(s))) As this leaves open the option to add new parameters in the future.

To avoid breaking backwards compatibility I'll use the hack that detects the argument this time, but in the future I'll try to remember to always design decorators to be called like @decorator().

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Idea: @db.register_function(deterministic=True) 731740458  
718168730 https://github.com/simonw/sqlite-utils/issues/191#issuecomment-718168730 https://api.github.com/repos/simonw/sqlite-utils/issues/191 MDEyOklzc3VlQ29tbWVudDcxODE2ODczMA== simonw 9599 2020-10-28T19:47:20Z 2020-10-28T19:47:20Z OWNER

https://stackoverflow.com/a/3931903 looks useful: python def trace(*args): def _trace(func): def wrapper(*args, **kwargs): print enter_string func(*args, **kwargs) print exit_string return wrapper if len(args) == 1 and callable(args[0]): # No arguments, this is the decorator # Set default values for the arguments enter_string = 'entering' exit_string = 'exiting' return _trace(args[0]) else: # This is just returning the decorator enter_string, exit_string = args return _trace Can improve that code with functools.wraps.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Idea: @db.register_function(deterministic=True) 731740458  

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