home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

7 rows where author_association = "OWNER" and "updated_at" is on date 2021-12-07 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

issue 5

  • A way of creating indexes on newly created tables 2
  • Code that detects the label column for a table is case-sensitive 2
  • Columns starting with an underscore behave poorly in filters 1
  • Support `--import xml.etree.ElementTree` in `sqlite-utils convert` 1
  • `sqlite-utils insert --extract colname` 1

user 1

  • simonw 7

author_association 1

  • OWNER · 7 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
988226938 https://github.com/simonw/datasette/issues/1544#issuecomment-988226938 https://api.github.com/repos/simonw/datasette/issues/1544 IC_kwDOBm6k_c465yV6 simonw 9599 2021-12-07T20:02:44Z 2021-12-07T20:02:44Z OWNER

I'm feeling rushed today so I'm going to fix this without adding a test!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Code that detects the label column for a table is case-sensitive 1073712378  
988226523 https://github.com/simonw/datasette/issues/1544#issuecomment-988226523 https://api.github.com/repos/simonw/datasette/issues/1544 IC_kwDOBm6k_c465yPb simonw 9599 2021-12-07T20:02:00Z 2021-12-07T20:02:00Z OWNER

Here's the code at fault: https://github.com/simonw/datasette/blob/0a7621f96f8ad14da17e7172e8a7bce24ef78966/datasette/database.py#L288-L291

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Code that detects the label column for a table is case-sensitive 1073712378  
988154238 https://github.com/simonw/datasette/issues/1527#issuecomment-988154238 https://api.github.com/repos/simonw/datasette/issues/1527 IC_kwDOBm6k_c465gl- simonw 9599 2021-12-07T18:05:26Z 2021-12-07T18:05:26Z OWNER

Found a new case of this bug: click the "Apply" button on https://latest.datasette.io/fixtures/facetable?_sort=pk&_city_id__gt=1

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Columns starting with an underscore behave poorly in filters 1059555791  
987461427 https://github.com/simonw/sqlite-utils/issues/349#issuecomment-987461427 https://api.github.com/repos/simonw/sqlite-utils/issues/349 IC_kwDOCGYnMM4623cz simonw 9599 2021-12-07T01:03:43Z 2021-12-07T01:04:37Z OWNER

In terms of types, I think that means it looks like this:

```python IndexesType = Iterable[ Union[str, Iterable[str]] ]

def create( self, columns: Dict[str, Any], pk: Optional[Any] = None, ... indexes: Optional[IndexesType] = None, ): ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
A way of creating indexes on newly created tables 1071531082  
987458772 https://github.com/simonw/sqlite-utils/issues/349#issuecomment-987458772 https://api.github.com/repos/simonw/sqlite-utils/issues/349 IC_kwDOCGYnMM4622zU simonw 9599 2021-12-07T01:00:41Z 2021-12-07T01:00:41Z OWNER

I think the syntax design of this looks like: python item_pk = db[item_table].lookup( {"_item_id": item_id}, item_to_insert, column_order=("_id", "_item_id"), pk="_id", indexes=("_version",), ) So it's a sequence of column names... or a sequence of tuples for creating compound indexes: python db["dogs"].insert( {"name": "Cleo", "species": "Mutt", "hobbies": "Raiding picnics"}, indexes=(("name", "species"), "hobbies"), )

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
A way of creating indexes on newly created tables 1071531082  
987454872 https://github.com/simonw/sqlite-utils/issues/352#issuecomment-987454872 https://api.github.com/repos/simonw/sqlite-utils/issues/352 IC_kwDOCGYnMM46212Y simonw 9599 2021-12-07T00:56:29Z 2021-12-07T00:56:29Z OWNER

Thought about this due to this issue, which should stay consistent with how the sqlite-utils CLI works:

  • https://github.com/simonw/git-history/issues/41
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
`sqlite-utils insert --extract colname` 1072792507  
987437043 https://github.com/simonw/sqlite-utils/issues/351#issuecomment-987437043 https://api.github.com/repos/simonw/sqlite-utils/issues/351 IC_kwDOCGYnMM462xfz simonw 9599 2021-12-07T00:41:02Z 2021-12-07T00:41:56Z OWNER

The fix there was: diff @@ -463,7 +473,7 @@ def compile_convert(convert, imports): locals = {} globals = {"json": json} for import_ in imports: - globals[import_] = __import__(import_) + globals[import_.split(".")[0]] = __import__(import_) exec(code_o, globals, locals) With this example (needs to be modified here): git-history file items.xml --convert ' tree = xml.etree.ElementTree.fromstring(content) return [el.attrib for el in tree.iter("item")] ' --import xml.etree.ElementTree

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Support `--import xml.etree.ElementTree` in `sqlite-utils convert` 1072780607  

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 571.377ms · About: github-to-sqlite