home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where issue = 1063388037 sorted by updated_at descending

✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 1

  • simonw 4

issue 1

  • Provide function to generate hash_id from specified columns · 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
1055992544 https://github.com/simonw/sqlite-utils/issues/343#issuecomment-1055992544 https://api.github.com/repos/simonw/sqlite-utils/issues/343 IC_kwDOCGYnMM4-8Srg simonw 9599 2022-03-02T00:06:10Z 2022-03-02T00:06:10Z OWNER

Updated documentation: https://sqlite-utils.datasette.io/en/latest/python-api.html#setting-an-id-based-on-the-hash-of-the-row-contents

Documentation for the renamed utils.hash_record() function: https://sqlite-utils.datasette.io/en/latest/reference.html#sqlite-utils-utils-hash-record

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Provide function to generate hash_id from specified columns 1063388037  
1055991226 https://github.com/simonw/sqlite-utils/issues/343#issuecomment-1055991226 https://api.github.com/repos/simonw/sqlite-utils/issues/343 IC_kwDOCGYnMM4-8SW6 simonw 9599 2022-03-02T00:03:47Z 2022-03-02T00:03:47Z OWNER

Oops, broke mypy:

sqlite_utils/db.py:2600: error: Incompatible default for argument "hash_id_columns" (default has type "Default", argument has type "Optional[Iterable[str]]") Found 1 error in 1 file (checked 49 source files)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Provide function to generate hash_id from specified columns 1063388037  
1055855845 https://github.com/simonw/sqlite-utils/issues/343#issuecomment-1055855845 https://api.github.com/repos/simonw/sqlite-utils/issues/343 IC_kwDOCGYnMM4-7xTl simonw 9599 2022-03-01T21:04:45Z 2022-03-01T22:43:38Z OWNER

I'm going to make that _hash() utility function a documented, non-underscore-prefixed function too - called hash_record().

{
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 1,
    "eyes": 0
}
Provide function to generate hash_id from specified columns 1063388037  
1055854884 https://github.com/simonw/sqlite-utils/issues/343#issuecomment-1055854884 https://api.github.com/repos/simonw/sqlite-utils/issues/343 IC_kwDOCGYnMM4-7xEk simonw 9599 2022-03-01T21:03:45Z 2022-03-01T21:03:45Z OWNER

Just found myself needing this capability myself!

Relevant code:

https://github.com/simonw/sqlite-utils/blob/8f386a0d300d1b1c76132bb75972b755049fb742/sqlite_utils/db.py#L2297-L2307

https://github.com/simonw/sqlite-utils/blob/8f386a0d300d1b1c76132bb75972b755049fb742/sqlite_utils/db.py#L2996-L3001

So various functions could grow a hash_id_columns=("title", "date") argument which causes just those columns to be included in the hash.

Bonus: if you use hash_id_columns=... without setting hash_id="id" it could assume that you want the column to be called id.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Provide function to generate hash_id from specified columns 1063388037  

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