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/datasette/issues/685#issuecomment-625603221,https://api.github.com/repos/simonw/datasette/issues/685,625603221,MDEyOklzc3VlQ29tbWVudDYyNTYwMzIyMQ==,9599,2020-05-08T03:00:23Z,2020-05-08T03:00:23Z,OWNER,Working with this in https://github.com/simonw/datasette-media/issues/2 made me really want to redesign this API: https://github.com/simonw/datasette-media/commit/be23ec3d05900b69a3d47bc1e0dd056c333125f4,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",570309546, https://github.com/simonw/datasette/issues/685#issuecomment-625817999,https://api.github.com/repos/simonw/datasette/issues/685,625817999,MDEyOklzc3VlQ29tbWVudDYyNTgxNzk5OQ==,9599,2020-05-08T13:33:23Z,2020-05-08T13:33:23Z,OWNER,I'm going to rename `execute_against_connection_in_thread()` to just `execute_fn()`.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",570309546, https://github.com/simonw/datasette/issues/685#issuecomment-625839046,https://api.github.com/repos/simonw/datasette/issues/685,625839046,MDEyOklzc3VlQ29tbWVudDYyNTgzOTA0Ng==,9599,2020-05-08T14:20:43Z,2020-05-08T14:25:05Z,OWNER,"The API design for the `.execute()` function is actually fine, I think it's more the API of the returned `Results` object that I want to improve. That object encapsulates the returned data, the named columns and whether or not the result was truncated. return Results(rows, truncated, cursor.description) The `rows` argument comes from either `rows = cursor.fetchmany(max_returned_rows + 1)` or `rows = cursor.fetchall()`. It's a Python list of `sqlite3.Row` objects. Here's the current class implementation: https://github.com/simonw/datasette/blob/0784f2ef9d3ff6dd9df05f54cb51de29a6d11764/datasette/utils/__init__.py#L54-L68","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",570309546, https://github.com/simonw/datasette/issues/685#issuecomment-625841397,https://api.github.com/repos/simonw/datasette/issues/685,625841397,MDEyOklzc3VlQ29tbWVudDYyNTg0MTM5Nw==,9599,2020-05-08T14:25:56Z,2020-05-08T14:27:15Z,OWNER,"Maybe all I really want here is to add length and access-by-index methods to the Results class? So I don't have to do `results.rows[0][0]` to get at a single returned value. Also how about a `results.single_value()` method which returns a value only if there is a single row with a single column, otherwise raises an exception?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",570309546, https://github.com/simonw/datasette/issues/685#issuecomment-625849497,https://api.github.com/repos/simonw/datasette/issues/685,625849497,MDEyOklzc3VlQ29tbWVudDYyNTg0OTQ5Nw==,9599,2020-05-08T14:43:13Z,2020-05-08T14:43:13Z,OWNER,"I'm going to add `.first()` and `.last()` methods too. These will return the first or last row, or `None` if the results are empty (rather than raising an `IndexError`).","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",570309546, https://github.com/simonw/datasette/issues/685#issuecomment-625850152,https://api.github.com/repos/simonw/datasette/issues/685,625850152,MDEyOklzc3VlQ29tbWVudDYyNTg1MDE1Mg==,9599,2020-05-08T14:44:37Z,2020-05-08T14:44:37Z,OWNER,"I'll write the API documentation first, in a branch.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",570309546, https://github.com/simonw/datasette/issues/685#issuecomment-625862578,https://api.github.com/repos/simonw/datasette/issues/685,625862578,MDEyOklzc3VlQ29tbWVudDYyNTg2MjU3OA==,9599,2020-05-08T15:10:16Z,2020-05-08T15:10:16Z,OWNER,I'm not going to do ``.last()`` because it could be confusing if truncation has come into play.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",570309546, https://github.com/simonw/datasette/issues/685#issuecomment-625865434,https://api.github.com/repos/simonw/datasette/issues/685,625865434,MDEyOklzc3VlQ29tbWVudDYyNTg2NTQzNA==,9599,2020-05-08T15:16:43Z,2020-05-08T15:16:43Z,OWNER,Documentation for improved design: https://github.com/simonw/datasette/pull/763/files#diff-87703da03a02e0f8dae01f39abd6250f,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",570309546, https://github.com/simonw/datasette/issues/685#issuecomment-625866419,https://api.github.com/repos/simonw/datasette/issues/685,625866419,MDEyOklzc3VlQ29tbWVudDYyNTg2NjQxOQ==,9599,2020-05-08T15:18:55Z,2020-05-08T15:18:55Z,OWNER,"This code should live somewhere other than `datasette/utils/__init__.py`. Especially the exceptions, since calling code needs to be able to sensibly import them.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",570309546, https://github.com/simonw/datasette/issues/685#issuecomment-625868416,https://api.github.com/repos/simonw/datasette/issues/685,625868416,MDEyOklzc3VlQ29tbWVudDYyNTg2ODQxNg==,9599,2020-05-08T15:23:04Z,2020-05-08T15:23:04Z,OWNER,I'll move the code into `datasette/database.py`.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",570309546, https://github.com/simonw/datasette/issues/685#issuecomment-625887196,https://api.github.com/repos/simonw/datasette/issues/685,625887196,MDEyOklzc3VlQ29tbWVudDYyNTg4NzE5Ng==,9599,2020-05-08T16:03:16Z,2020-05-08T16:03:16Z,OWNER,[ Fun aside: I implemented and shipped this entire branch in my browser using the beta of GitHub's new [Codespaces](https://github.com/features/codespaces) ],"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",570309546, https://github.com/simonw/datasette/issues/685#issuecomment-625889303,https://api.github.com/repos/simonw/datasette/issues/685,625889303,MDEyOklzc3VlQ29tbWVudDYyNTg4OTMwMw==,9599,2020-05-08T16:07:55Z,2020-05-08T16:07:55Z,OWNER,New documentation is live here: https://datasette.readthedocs.io/en/latest/internals.html#database-class,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",570309546, https://github.com/simonw/datasette/issues/685#issuecomment-625889673,https://api.github.com/repos/simonw/datasette/issues/685,625889673,MDEyOklzc3VlQ29tbWVudDYyNTg4OTY3Mw==,9599,2020-05-08T16:08:40Z,2020-05-08T16:08:40Z,OWNER,I'm going to ship a release with just this change purely so I can start depending on it from my in-development https://github.com/simonw/datasette-media plugin.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",570309546, https://github.com/simonw/datasette/issues/685#issuecomment-625890190,https://api.github.com/repos/simonw/datasette/issues/685,625890190,MDEyOklzc3VlQ29tbWVudDYyNTg5MDE5MA==,9599,2020-05-08T16:09:44Z,2020-05-08T16:09:56Z,OWNER,Re-opening this ticket because I forgot to document `execute_fn()` (the old `execute_against_connection_in_thread()` method).,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",570309546, https://github.com/dogsheep/dogsheep-photos/issues/20#issuecomment-625947133,https://api.github.com/repos/dogsheep/dogsheep-photos/issues/20,625947133,MDEyOklzc3VlQ29tbWVudDYyNTk0NzEzMw==,9599,2020-05-08T18:13:06Z,2020-05-08T18:13:06Z,MEMBER,`datasette-media` will be able to handle this once I implement https://github.com/simonw/datasette-media/issues/3,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",613006393, https://github.com/simonw/datasette/issues/619#issuecomment-626006493,https://api.github.com/repos/simonw/datasette/issues/619,626006493,MDEyOklzc3VlQ29tbWVudDYyNjAwNjQ5Mw==,412005,2020-05-08T20:29:12Z,2020-05-08T20:29:12Z,NONE,"just trying out datasette and quite like it, thanks! i found this issue annoying enough to have a go at a fix. have you any thoughts on a good approach? (i'm happy to dig in myself if you haven't thought about it yet, but wanted to check if you had an idea for how to fix when you raised the issue)","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",520655983,