issue_comments: 850766335
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/260#issuecomment-850766335 | https://api.github.com/repos/simonw/sqlite-utils/issues/260 | 850766335 | MDEyOklzc3VlQ29tbWVudDg1MDc2NjMzNQ== | 9599 | 2021-05-29T04:18:19Z | 2021-05-29T04:18:19Z | OWNER | Annoyingly the `table.indexes` property won't indicate if an index is in regular or reverse order - because the SQLite `PRAGMA index_info(table)` statement doesn't indicate that either. You have to look at the `sqlite_master` index definition to tell if any of the columns are in reverse order: ``` (Pdb) fresh_db.execute("select * from sqlite_master where type = 'index'").fetchall() [('index', 'idx_dogs_age_name', 'dogs', 3, 'CREATE INDEX [idx_dogs_age_name]\n ON [dogs] ([age] desc, [name])')] (Pdb) fresh_db.execute("PRAGMA index_info('idx_dogs_age_name')").fetchall() [(0, 2, 'age'), (1, 0, 'name')] (Pdb) fresh_db.execute("PRAGMA index_info('idx_dogs_age_name')").description (('seqno', None, None, None, None, None, None), ('cid', None, None, None, None, None, None), ('name', None, None, None, None, None, None)) (Pdb) dogs.indexes [Index(seq=0, name='idx_dogs_age_name', unique=0, origin='c', partial=0, columns=['age', 'name'])] ``` | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 906330187 |