home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

5 rows where issue = 906345899 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 5

issue 1

  • `table.xindexes` using `PRAGMA index_xinfo(table)` · 5 ✖

author_association 1

  • OWNER 5
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
853541869 https://github.com/simonw/sqlite-utils/issues/261#issuecomment-853541869 https://api.github.com/repos/simonw/sqlite-utils/issues/261 MDEyOklzc3VlQ29tbWVudDg1MzU0MTg2OQ== simonw 9599 2021-06-03T03:54:14Z 2021-06-03T03:54:14Z OWNER

Documentation: https://sqlite-utils.datasette.io/en/latest/python-api.html#xindexes

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
`table.xindexes` using `PRAGMA index_xinfo(table)` 906345899  
853535559 https://github.com/simonw/sqlite-utils/issues/261#issuecomment-853535559 https://api.github.com/repos/simonw/sqlite-utils/issues/261 MDEyOklzc3VlQ29tbWVudDg1MzUzNTU1OQ== simonw 9599 2021-06-03T03:32:47Z 2021-06-03T03:32:47Z OWNER

New design: python def test_xindexes(fresh_db): fresh_db.executescript( """ create table Gosh (c1 text, c2 text, c3 text); create index Gosh_c1 on Gosh(c1); create index Gosh_c2c3 on Gosh(c2, c3 desc); """ ) assert fresh_db["Gosh"].xindexes == [ XIndex( name="Gosh_c2c3", columns=[ XIndexColumn(seqno=0, cid=1, name="c2", desc=0, coll="BINARY", key=1), XIndexColumn(seqno=1, cid=2, name="c3", desc=1, coll="BINARY", key=1), XIndexColumn(seqno=2, cid=-1, name=None, desc=0, coll="BINARY", key=0), ], ), XIndex( name="Gosh_c1", columns=[ XIndexColumn(seqno=0, cid=0, name="c1", desc=0, coll="BINARY", key=1), XIndexColumn(seqno=1, cid=-1, name=None, desc=0, coll="BINARY", key=0), ], ), ]

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
`table.xindexes` using `PRAGMA index_xinfo(table)` 906345899  
853534732 https://github.com/simonw/sqlite-utils/issues/261#issuecomment-853534732 https://api.github.com/repos/simonw/sqlite-utils/issues/261 MDEyOklzc3VlQ29tbWVudDg1MzUzNDczMg== simonw 9599 2021-06-03T03:30:10Z 2021-06-03T03:30:10Z OWNER

I'm going to return XIndex(name, columns) - where columns is a list of XIndexColumn.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
`table.xindexes` using `PRAGMA index_xinfo(table)` 906345899  
853530348 https://github.com/simonw/sqlite-utils/issues/261#issuecomment-853530348 https://api.github.com/repos/simonw/sqlite-utils/issues/261 MDEyOklzc3VlQ29tbWVudDg1MzUzMDM0OA== simonw 9599 2021-06-03T03:16:33Z 2021-06-03T03:16:33Z OWNER

In prototyping this out I realize that I actually want to get back the name of each index, then for each of them the detailed list of index columns. Here's the test from my initial prototype: python def test_xindexes(fresh_db): fresh_db.executescript( """ create table Gosh (c1 text, c2 text, c3 text); create index Gosh_c1 on Gosh(c1); create index Gosh_c2c3 on Gosh(c2, c3 desc); """ ) assert fresh_db["Gosh"].xindexes == [ ( "Gosh_c2c3", [ XIndex(seqno=0, cid=1, name="c2", desc=0, coll="BINARY", key=1), XIndex(seqno=1, cid=2, name="c3", desc=1, coll="BINARY", key=1), XIndex(seqno=2, cid=-1, name=None, desc=0, coll="BINARY", key=0), ], ), ( "Gosh_c1", [ XIndex(seqno=0, cid=0, name="c1", desc=0, coll="BINARY", key=1), XIndex(seqno=1, cid=-1, name=None, desc=0, coll="BINARY", key=0), ], ), ]

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
`table.xindexes` using `PRAGMA index_xinfo(table)` 906345899  
853525036 https://github.com/simonw/sqlite-utils/issues/261#issuecomment-853525036 https://api.github.com/repos/simonw/sqlite-utils/issues/261 MDEyOklzc3VlQ29tbWVudDg1MzUyNTAzNg== simonw 9599 2021-06-03T03:02:22Z 2021-06-03T03:02:22Z OWNER

This would be a breaking change - and the fact that it returns auxiliary columns isn't particularly useful for most cases - "Auxiliary columns are additional columns needed to locate the table entry that corresponds to each index entry".

Instead, I'm going to add a new property table.xindexes which exposes this.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
`table.xindexes` using `PRAGMA index_xinfo(table)` 906345899  

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