issue_comments: 853530348

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions issue performed_via_github_app
https://github.com/simonw/sqlite-utils/issues/261#issuecomment-853530348 https://api.github.com/repos/simonw/sqlite-utils/issues/261 853530348 MDEyOklzc3VlQ29tbWVudDg1MzUzMDM0OA== 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:

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
}
906345899