home / github

Menu
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

29 rows where "created_at" is on date 2020-10-16

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: issue_url, issue

created_at (date) 1 ✖

  • 2020-10-16 · 29 ✖
id ▼ html_url issue_url node_id user created_at updated_at author_association body reactions issue performed_via_github_app
709705624 https://github.com/simonw/sqlite-utils/issues/186#issuecomment-709705624 https://api.github.com/repos/simonw/sqlite-utils/issues/186 MDEyOklzc3VlQ29tbWVudDcwOTcwNTYyNA== simonw 9599 2020-10-16T03:14:39Z 2020-10-16T03:14:39Z OWNER How should this work with extractions covering multiple columns? If there's a single column then it makes sense that a `null` value would not be extracted into the lookup table, but would instead become stay as `null`. For a multiple column extraction, provided at least one of those columns is not null It should map to a record in the lookup table. Only if ALL of the extracted columns are null should the lookup value stay null. {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} .extract() shouldn't extract null values 722816436  
709705885 https://github.com/simonw/sqlite-utils/issues/186#issuecomment-709705885 https://api.github.com/repos/simonw/sqlite-utils/issues/186 MDEyOklzc3VlQ29tbWVudDcwOTcwNTg4NQ== simonw 9599 2020-10-16T03:15:39Z 2020-10-16T03:15:39Z OWNER The alternative solution here would be that a single `null` value DOES get extracted. To implement this I would need to add some logic that uses `is null` instead of `=`. {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} .extract() shouldn't extract null values 722816436  
709706065 https://github.com/simonw/sqlite-utils/issues/186#issuecomment-709706065 https://api.github.com/repos/simonw/sqlite-utils/issues/186 MDEyOklzc3VlQ29tbWVudDcwOTcwNjA2NQ== simonw 9599 2020-10-16T03:16:22Z 2020-10-16T03:16:22Z OWNER Either way I think I'm going to need to add some SQL which uses `where a = b or (a is null and b is null)`. {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} .extract() shouldn't extract null values 722816436  
709706260 https://github.com/simonw/sqlite-utils/issues/186#issuecomment-709706260 https://api.github.com/repos/simonw/sqlite-utils/issues/186 MDEyOklzc3VlQ29tbWVudDcwOTcwNjI2MA== simonw 9599 2020-10-16T03:17:02Z 2020-10-16T03:17:17Z OWNER Actually I think this should be an option to `.extract()` which controls if nulls are extracted or left alone. Maybe called `extract_nulls=True/False`. {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} .extract() shouldn't extract null values 722816436  
710178871 https://github.com/simonw/sqlite-utils/issues/182#issuecomment-710178871 https://api.github.com/repos/simonw/sqlite-utils/issues/182 MDEyOklzc3VlQ29tbWVudDcxMDE3ODg3MQ== simonw 9599 2020-10-16T16:27:39Z 2020-10-16T16:28:14Z OWNER The file is opened for me by `click.File()`, which also handles things like `-` for stdin. But i neee to be able to switch the encoding used to read from that based on the `--encoding` option. I think the way to do that is to open the file in binary mode and then wrap it in a codec reader: ```python fp = codecs.getreader(encoding)(fp) ``` {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} Better handling of encodings other than utf-8 for "sqlite-utils insert" 711649325  
710198162 https://github.com/simonw/sqlite-utils/issues/186#issuecomment-710198162 https://api.github.com/repos/simonw/sqlite-utils/issues/186 MDEyOklzc3VlQ29tbWVudDcxMDE5ODE2Mg== simonw 9599 2020-10-16T16:41:00Z 2020-10-16T16:41:00Z OWNER Failing test: ```python def test_extract_null_values(fresh_db): fresh_db["species"].insert({"id": 1, "species": "Wolf"}, pk="id") fresh_db["individuals"].insert_all( [ {"id": 10, "name": "Terriana", "species": "Fox"}, {"id": 11, "name": "Spenidorm", "species": None}, {"id": 12, "name": "Grantheim", "species": "Wolf"}, {"id": 13, "name": "Turnutopia", "species": None}, {"id": 14, "name": "Wargal", "species": "Wolf"}, ], pk="id", ) fresh_db["individuals"].extract("species") assert fresh_db["species"].schema == ( "CREATE TABLE [species] (\n" " [id] INTEGER PRIMARY KEY,\n" " [species] TEXT\n" ")" ) assert fresh_db["individuals"].schema == ( 'CREATE TABLE "individuals" (\n' " [id] INTEGER PRIMARY KEY,\n" " [name] TEXT,\n" " [species_id] INTEGER,\n" " FOREIGN KEY(species_id) REFERENCES species(id)\n" ")" ) assert list(fresh_db["species"].rows) == [ {"id": 1, "species": "Wolf"}, {"id": 2, "species": "Fox"}, ] assert list(fresh_db["individuals"].rows) == [ {"id": 10, "name": "Terriana", "species_id": 2}, {"id": 11, "name": "Spenidorm", "species_id": None}, {"id": 12, "name": "Grantheim", "species_id": 1}, {"id": 13, "name": "Turnutopia", "species_id": None}, {"id": 14, "name": "Wargal", "species_id": 1}, ] ``` {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} .extract() shouldn't extract null values 722816436  
710258736 https://github.com/simonw/sqlite-utils/issues/182#issuecomment-710258736 https://api.github.com/repos/simonw/sqlite-utils/issues/182 MDEyOklzc3VlQ29tbWVudDcxMDI1ODczNg== simonw 9599 2020-10-16T17:20:41Z 2020-10-16T17:20:41Z OWNER Documentation: https://sqlite-utils.readthedocs.io/en/latest/cli.html#inserting-csv-or-tsv-data {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} Better handling of encodings other than utf-8 for "sqlite-utils insert" 711649325  
710346830 https://github.com/simonw/sqlite-utils/issues/49#issuecomment-710346830 https://api.github.com/repos/simonw/sqlite-utils/issues/49 MDEyOklzc3VlQ29tbWVudDcxMDM0NjgzMA== simonw 9599 2020-10-16T18:08:52Z 2020-10-16T18:09:21Z OWNER The new `.extract()` method can handle multiple columns: https://github.com/simonw/sqlite-utils/blob/2c541fac352632e23e40b0d21e3f233f7a744a57/tests/test_extract.py#L70-L87 {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} extracts= should support multiple-column extracts 472115381  
710359724 https://github.com/simonw/sqlite-utils/issues/49#issuecomment-710359724 https://api.github.com/repos/simonw/sqlite-utils/issues/49 MDEyOklzc3VlQ29tbWVudDcxMDM1OTcyNA== simonw 9599 2020-10-16T18:15:31Z 2020-10-16T18:15:31Z OWNER Using a tuple would work: ```python fresh_db.table("tree", extracts=[("common_name", "latin_name")]) ``` Or to define a custom name: ```python fresh_db.table("tree", extracts={("common_name", "latin_name"): "names"}) ``` {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} extracts= should support multiple-column extracts 472115381  
710363789 https://github.com/simonw/sqlite-utils/issues/49#issuecomment-710363789 https://api.github.com/repos/simonw/sqlite-utils/issues/49 MDEyOklzc3VlQ29tbWVudDcxMDM2Mzc4OQ== simonw 9599 2020-10-16T18:18:05Z 2020-10-16T18:18:05Z OWNER I wonder if there's value in extending the `extracts=` option at all given the existence of `table.extract()`. {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} extracts= should support multiple-column extracts 472115381  
710364942 https://github.com/simonw/sqlite-utils/issues/49#issuecomment-710364942 https://api.github.com/repos/simonw/sqlite-utils/issues/49 MDEyOklzc3VlQ29tbWVudDcxMDM2NDk0Mg== simonw 9599 2020-10-16T18:18:48Z 2020-10-16T18:18:48Z OWNER I think there is. It's a nice existing feature, and I don't think adding tuple support to it would be a huge lift. {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} extracts= should support multiple-column extracts 472115381  
710390915 https://github.com/simonw/sqlite-utils/issues/49#issuecomment-710390915 https://api.github.com/repos/simonw/sqlite-utils/issues/49 MDEyOklzc3VlQ29tbWVudDcxMDM5MDkxNQ== simonw 9599 2020-10-16T18:34:26Z 2020-10-16T18:34:50Z OWNER Here's the most complex example of `.extracts()`: ```python db["Trees"].extract( ["CommonName", "LatinName"], table="Species", fk_column="species_id", rename={"CommonName": "name", "LatinName": "latin"} ) ``` Resulting in: ```sql CREATE TABLE [Species] ( [id] INTEGER PRIMARY KEY, [name] TEXT, [latin] TEXT ) ``` From https://sqlite-utils.readthedocs.io/en/stable/python-api.html#extracting-columns-into-a-separate-table {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} extracts= should support multiple-column extracts 472115381  
710393550 https://github.com/simonw/sqlite-utils/issues/49#issuecomment-710393550 https://api.github.com/repos/simonw/sqlite-utils/issues/49 MDEyOklzc3VlQ29tbWVudDcxMDM5MzU1MA== simonw 9599 2020-10-16T18:35:57Z 2020-10-16T18:36:39Z OWNER If I want to support that most complicated example, I think the option to pass a `Extracts()` object to `extracts=` is the best way to do it: ```python fresh_db.table("tree", extracts=[Extract( columns=("CommonName", "LatinName"), table="Species", fk_column="species_id", rename={"CommonName": "name", "LatinName": "latin"} )]) ``` {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} extracts= should support multiple-column extracts 472115381  
710395444 https://github.com/simonw/sqlite-utils/issues/49#issuecomment-710395444 https://api.github.com/repos/simonw/sqlite-utils/issues/49 MDEyOklzc3VlQ29tbWVudDcxMDM5NTQ0NA== simonw 9599 2020-10-16T18:37:10Z 2020-10-16T18:37:10Z OWNER But this begins to feel too complicated, given that `table.extract()` can already be used to achieve the same thing. {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} extracts= should support multiple-column extracts 472115381  
710397574 https://github.com/simonw/sqlite-utils/issues/49#issuecomment-710397574 https://api.github.com/repos/simonw/sqlite-utils/issues/49 MDEyOklzc3VlQ29tbWVudDcxMDM5NzU3NA== simonw 9599 2020-10-16T18:38:21Z 2020-10-16T18:38:21Z OWNER I'm not going to implement this. I'll leave `extract=...` as it is right now, suitable for quick simple single-column operations on input, but if users want to do something more complicated involving multiple columns they should use the `table.extract()` method after the initial insert instead. {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} extracts= should support multiple-column extracts 472115381  
710399593 https://github.com/simonw/sqlite-utils/issues/58#issuecomment-710399593 https://api.github.com/repos/simonw/sqlite-utils/issues/58 MDEyOklzc3VlQ29tbWVudDcxMDM5OTU5Mw== simonw 9599 2020-10-16T18:39:31Z 2020-10-16T18:39:31Z OWNER I don't think this is valuable enough to justify adding to the library - especially since you can execute FTS search against views by joining to an FTS table built against an underlying table. {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} Support enabling FTS on views 488293926  
710402331 https://github.com/simonw/sqlite-utils/issues/48#issuecomment-710402331 https://api.github.com/repos/simonw/sqlite-utils/issues/48 MDEyOklzc3VlQ29tbWVudDcxMDQwMjMzMQ== simonw 9599 2020-10-16T18:41:06Z 2020-10-16T18:41:06Z OWNER I could use this demo from JupyterCon 2020 https://gist.github.com/simonw/656c21b5800d5e4624dec9930f00e093 {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} Jupyter notebook demo of the library, launchable on Binder 471818939  
710405658 https://github.com/simonw/sqlite-utils/issues/69#issuecomment-710405658 https://api.github.com/repos/simonw/sqlite-utils/issues/69 MDEyOklzc3VlQ29tbWVudDcxMDQwNTY1OA== simonw 9599 2020-10-16T18:42:48Z 2020-10-16T18:42:48Z OWNER Did some work on this for #134 in 7e9aad7e1c09d1cf80d0b4d17d6157212a4b857d I still need to add `--load-extension` to other CLI methods, see #137. Closing this issue in favour of that one. {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} Feature request: enable extensions loading 534507142  
710428802 https://github.com/simonw/sqlite-utils/issues/136#issuecomment-710428802 https://api.github.com/repos/simonw/sqlite-utils/issues/136 MDEyOklzc3VlQ29tbWVudDcxMDQyODgwMg== simonw 9599 2020-10-16T18:56:47Z 2020-10-16T18:56:47Z OWNER To keep the code cleaner, I'm tempted to support this instead: --load-extension=spatialite Where `spatialite` is a special shortcut value that triggers a search for that module in known locations. Users could still load a module in a file called `spatialite` in the current directory using: --load-extension=./spatialite In fact, `--load-extension=spatialite` could handle that case too by always checking for a file called `spatialite` before attempting to search for it in known locations. {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} --load-extension=spatialite shortcut option 683812642  
710440853 https://github.com/simonw/sqlite-utils/issues/187#issuecomment-710440853 https://api.github.com/repos/simonw/sqlite-utils/issues/187 MDEyOklzc3VlQ29tbWVudDcxMDQ0MDg1Mw== simonw 9599 2020-10-16T19:04:19Z 2020-10-16T19:04:19Z OWNER I split this off from #136. {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} Maybe: Utility method / CLI tool for initializing SpatiaLite 723460107  
710456981 https://github.com/simonw/sqlite-utils/issues/187#issuecomment-710456981 https://api.github.com/repos/simonw/sqlite-utils/issues/187 MDEyOklzc3VlQ29tbWVudDcxMDQ1Njk4MQ== simonw 9599 2020-10-16T19:15:13Z 2020-10-16T19:15:13Z OWNER This is a duplicate of #79. {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} Maybe: Utility method / CLI tool for initializing SpatiaLite 723460107  
710460242 https://github.com/simonw/sqlite-utils/issues/89#issuecomment-710460242 https://api.github.com/repos/simonw/sqlite-utils/issues/89 MDEyOklzc3VlQ29tbWVudDcxMDQ2MDI0Mg== simonw 9599 2020-10-16T19:17:27Z 2020-10-16T19:17:50Z OWNER I came up with potential syntax for that here: https://github.com/simonw/sqlite-utils/issues/49#issuecomment-710393550 - based on how `table.extract(...)` works: ```python fresh_db.table("tree", extracts=[Extract( columns=("CommonName", "LatinName"), table="Species", fk_column="species_id", rename={"CommonName": "name", "LatinName": "latin"} )]) ``` {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} Ability to customize columns used by extracts= feature 573578548  
710461468 https://github.com/simonw/sqlite-utils/issues/49#issuecomment-710461468 https://api.github.com/repos/simonw/sqlite-utils/issues/49 MDEyOklzc3VlQ29tbWVudDcxMDQ2MTQ2OA== simonw 9599 2020-10-16T19:18:19Z 2020-10-16T19:18:19Z OWNER Reconsidering: #89 was a feature request that relates to this, so maybe this is worth implementing after all. {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} extracts= should support multiple-column extracts 472115381  
710487083 https://github.com/simonw/datasette/issues/904#issuecomment-710487083 https://api.github.com/repos/simonw/datasette/issues/904 MDEyOklzc3VlQ29tbWVudDcxMDQ4NzA4Mw== simonw 9599 2020-10-16T19:34:10Z 2020-10-19T17:39:04Z OWNER Alternatively, I could expose a single object that knows how to construct all kinds of URLs. Something like this: ``` {{ urls.instance() }} {{ urls.database(database_name) }} {{ urls.table(database_name, table_name) }} etc ``` {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} datasette.urls.table() / .instance() / .database() methods for constructing URLs, also exposed to templates 663228985  
710693818 https://github.com/simonw/datasette/issues/468#issuecomment-710693818 https://api.github.com/repos/simonw/datasette/issues/468 MDEyOklzc3VlQ29tbWVudDcxMDY5MzgxOA== simonw 9599 2020-10-16T23:20:22Z 2020-10-16T23:20:22Z OWNER This is a duplicate of #461. {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} Pagination for the database index page 444746021  
710693927 https://github.com/simonw/datasette/issues/461#issuecomment-710693927 https://api.github.com/repos/simonw/datasette/issues/461 MDEyOklzc3VlQ29tbWVudDcxMDY5MzkyNw== simonw 9599 2020-10-16T23:20:43Z 2020-10-16T23:20:43Z OWNER Related: redesign homepage entirely #991. {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} Paginate + search for databases/tables on the homepage 443021509  
710694144 https://github.com/simonw/datasette/issues/991#issuecomment-710694144 https://api.github.com/repos/simonw/datasette/issues/991 MDEyOklzc3VlQ29tbWVudDcxMDY5NDE0NA== simonw 9599 2020-10-16T23:21:41Z 2020-10-16T23:21:41Z OWNER Relevant: https://github.com/simonw/datasette/discussions/1021 asks about controlling the order of databases on that page that have been loaded using configuration directory mode. {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} Redesign application homepage 714377268  
710694607 https://github.com/simonw/datasette/issues/991#issuecomment-710694607 https://api.github.com/repos/simonw/datasette/issues/991 MDEyOklzc3VlQ29tbWVudDcxMDY5NDYwNw== simonw 9599 2020-10-16T23:23:34Z 2020-10-16T23:23:34Z OWNER Thinking more about pagination and search from #461: if the job of the homepage is to showcase the data that is available in the instance - data that is mostly in tables - maybe it's the tables themselves (and the ability to paginate and search through them) that becomes key to the design of the page. {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} Redesign application homepage 714377268  
710694711 https://github.com/simonw/datasette/issues/991#issuecomment-710694711 https://api.github.com/repos/simonw/datasette/issues/991 MDEyOklzc3VlQ29tbWVudDcxMDY5NDcxMQ== simonw 9599 2020-10-16T23:24:03Z 2020-10-16T23:24:03Z OWNER I'm really interested in exploring how this page could work with hundreds of database files attached and thousands of total tables. {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} Redesign application homepage 714377268  

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 300.859ms · About: simonw/datasette-graphql