issue_comments
8,883 rows where user = 9599 sorted by updated_at descending
This data as json, CSV (advanced)
reactions 13 ✖
- {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} 5,878
- {"total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} 108
- {"total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 1, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} 23
- {"total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 1, "rocket": 0, "eyes": 0} 21
- {"total_count": 2, "+1": 2, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} 11
- {"total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 1, "eyes": 0} 6
- {"total_count": 1, "+1": 0, "-1": 0, "laugh": 1, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} 4
- {"total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 1} 3
- {"total_count": 2, "+1": 1, "-1": 0, "laugh": 0, "hooray": 1, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} 3
- {"total_count": 3, "+1": 3, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} 3
- {"total_count": 2, "+1": 0, "-1": 0, "laugh": 0, "hooray": 2, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} 2
- {"total_count": 2, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 1, "eyes": 0} 1
- {"total_count": 3, "+1": 0, "-1": 0, "laugh": 0, "hooray": 3, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} 1
user 1
- simonw · 6,064 ✖
id | html_url | issue_url | node_id | user | created_at | updated_at ▲ | author_association | body | reactions | issue | performed_via_github_app |
---|---|---|---|---|---|---|---|---|---|---|---|
997496626 | https://github.com/simonw/sqlite-utils/issues/356#issuecomment-997496626 | https://api.github.com/repos/simonw/sqlite-utils/issues/356 | IC_kwDOCGYnMM47dJcy | simonw 9599 | 2021-12-20T00:38:15Z | 2022-01-06T01:29:03Z | OWNER | The implementation of this gets a tiny bit complicated. Ignoring But... when It could run against those already-converted records but that's a little bit strange, since you'd have to do this:
Having to use But then for |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
`sqlite-utils insert --convert` option 1077431957 | |
1006211113 | https://github.com/simonw/sqlite-utils/issues/360#issuecomment-1006211113 | https://api.github.com/repos/simonw/sqlite-utils/issues/360 | IC_kwDOCGYnMM47-ZAp | simonw 9599 | 2022-01-06T01:27:53Z | 2022-01-06T01:27:53Z | OWNER | It looks like you were using The line of code there exhibits another problem: it's reading the entire JSON file into a Python string, so it looks like it's going to run out of RAM even before it gets to the SQLite in-memory database section. To handle a file of this size you'd need to write it to a SQLite database on-disk first. The The code in question is here: That's using Python generators for the CSV/TSV/JSON-NL variants... but it's doing this for regular JSON which requires reading the entire thing into memory: If you have the ability to control how your 170GB file is generated you may have more luck converting it to CSV or TSV or newline-delimited JSON, then using To be honest though I've never tested this tooling with anything nearly that big, so it's possible you'll still run into problems. If you do I'd love to hear about them! I would be tempted to tackle this size of job by writing a custom Python script, either using the |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
MemoryError 1091819089 | |
1005975080 | https://github.com/simonw/datasette/issues/1534#issuecomment-1005975080 | https://api.github.com/repos/simonw/datasette/issues/1534 | IC_kwDOBm6k_c479fYo | simonw 9599 | 2022-01-05T18:29:06Z | 2022-01-05T18:29:06Z | OWNER | A really big downside to this is that it turns out many CDNs - apparently including Cloudflare - don't support the Vary header at all! More in this thread: https://twitter.com/simonw/status/1478470282931163137 |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Maybe return JSON from HTML pages if `Accept: application/json` is sent 1065432388 | |
1003575286 | https://github.com/simonw/datasette/issues/1585#issuecomment-1003575286 | https://api.github.com/repos/simonw/datasette/issues/1585 | IC_kwDOBm6k_c470Vf2 | simonw 9599 | 2022-01-01T15:40:38Z | 2022-01-01T15:40:38Z | OWNER | API tutorial: https://firebase.google.com/docs/hosting/api-deploy |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Fire base caching for `publish cloudrun` 1091838742 | |
1001791592 | https://github.com/simonw/datasette/issues/1152#issuecomment-1001791592 | https://api.github.com/repos/simonw/datasette/issues/1152 | IC_kwDOBm6k_c47tiBo | simonw 9599 | 2021-12-27T23:04:31Z | 2021-12-27T23:04:31Z | OWNER | Another option: rethink permissions to always work in terms of where clauses users as part of a SQL query that returns the overall allowed set of databases or tables. This would require rethinking existing permissions but it might be worthwhile prior to 1.0. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Efficiently calculate list of databases/tables a user can view 770598024 | |
1001699559 | https://github.com/simonw/datasette/issues/878#issuecomment-1001699559 | https://api.github.com/repos/simonw/datasette/issues/878 | IC_kwDOBm6k_c47tLjn | simonw 9599 | 2021-12-27T18:53:04Z | 2021-12-27T18:53:04Z | OWNER | I'm going to see if I can come up with the simplest possible version of this pattern for the |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
New pattern for views that return either JSON or HTML, available for plugins 648435885 | |
1000935523 | https://github.com/simonw/datasette/issues/1576#issuecomment-1000935523 | https://api.github.com/repos/simonw/datasette/issues/1576 | IC_kwDOBm6k_c47qRBj | simonw 9599 | 2021-12-24T21:33:05Z | 2021-12-24T21:33:05Z | OWNER | Another option would be to attempt to import |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Traces should include SQL executed by subtasks created with `asyncio.gather` 1087181951 | |
1000673444 | https://github.com/simonw/datasette/issues/1577#issuecomment-1000673444 | https://api.github.com/repos/simonw/datasette/issues/1577 | IC_kwDOBm6k_c47pRCk | simonw 9599 | 2021-12-24T06:08:58Z | 2021-12-24T06:08:58Z | OWNER | https://pypistats.org/packages/datasette shows a breakdown of downloads by Python version: It looks like on a recent day I had 4,071 downloads from Python 3.7... and just 2 downloads from Python 3.6! |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Drop support for Python 3.6 1087913724 | |
1000535904 | https://github.com/simonw/datasette/issues/1534#issuecomment-1000535904 | https://api.github.com/repos/simonw/datasette/issues/1534 | IC_kwDOBm6k_c47ovdg | simonw 9599 | 2021-12-23T21:44:31Z | 2021-12-23T21:44:31Z | OWNER | A big downside to this is that I would need to use |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Maybe return JSON from HTML pages if `Accept: application/json` is sent 1065432388 | |
1000485719 | https://github.com/simonw/datasette/issues/1579#issuecomment-1000485719 | https://api.github.com/repos/simonw/datasette/issues/1579 | IC_kwDOBm6k_c47ojNX | simonw 9599 | 2021-12-23T19:19:45Z | 2021-12-23T19:19:45Z | OWNER | All of those removed |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
`.execute_write(... block=True)` should be the default behaviour 1087931918 | |
1000485505 | https://github.com/simonw/datasette/issues/1579#issuecomment-1000485505 | https://api.github.com/repos/simonw/datasette/issues/1579 | IC_kwDOBm6k_c47ojKB | simonw 9599 | 2021-12-23T19:19:13Z | 2021-12-23T19:19:13Z | OWNER | Updated docs for |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
`.execute_write(... block=True)` should be the default behaviour 1087931918 | |
1000481686 | https://github.com/simonw/datasette/issues/1579#issuecomment-1000481686 | https://api.github.com/repos/simonw/datasette/issues/1579 | IC_kwDOBm6k_c47oiOW | simonw 9599 | 2021-12-23T19:09:23Z | 2021-12-23T19:09:23Z | OWNER | Re-opening this because I missed updating some of the docs, and I also need to update Datasette's own code to not use |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
`.execute_write(... block=True)` should be the default behaviour 1087931918 | |
1000479737 | https://github.com/simonw/datasette/issues/1579#issuecomment-1000479737 | https://api.github.com/repos/simonw/datasette/issues/1579 | IC_kwDOBm6k_c47ohv5 | simonw 9599 | 2021-12-23T19:04:23Z | 2021-12-23T19:04:23Z | OWNER | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
`.execute_write(... block=True)` should be the default behaviour 1087931918 | ||
1000477813 | https://github.com/simonw/datasette/issues/1579#issuecomment-1000477813 | https://api.github.com/repos/simonw/datasette/issues/1579 | IC_kwDOBm6k_c47ohR1 | simonw 9599 | 2021-12-23T18:59:41Z | 2021-12-23T18:59:41Z | OWNER | I'm going to go with |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
`.execute_write(... block=True)` should be the default behaviour 1087931918 | |
1000477621 | https://github.com/simonw/datasette/issues/1579#issuecomment-1000477621 | https://api.github.com/repos/simonw/datasette/issues/1579 | IC_kwDOBm6k_c47ohO1 | simonw 9599 | 2021-12-23T18:59:12Z | 2021-12-23T18:59:12Z | OWNER | The easiest way to change this would be to default to An alternative would be to add new, separately named methods which do the fire-and-forget thing. If I hadn't recently added |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
`.execute_write(... block=True)` should be the default behaviour 1087931918 | |
1000476413 | https://github.com/simonw/datasette/issues/1579#issuecomment-1000476413 | https://api.github.com/repos/simonw/datasette/issues/1579 | IC_kwDOBm6k_c47og79 | simonw 9599 | 2021-12-23T18:56:06Z | 2021-12-23T18:56:06Z | OWNER | This is technically a breaking change, but a GitHub code search at https://cs.github.com/?scopeName=All+repos&scope=&q=execute_write%20datasette%20-owner%3Asimonw shows only one repo not-owned-by-me using this, and they're using |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
`.execute_write(... block=True)` should be the default behaviour 1087931918 | |
1000471782 | https://github.com/simonw/datasette/issues/1578#issuecomment-1000471782 | https://api.github.com/repos/simonw/datasette/issues/1578 | IC_kwDOBm6k_c47ofzm | simonw 9599 | 2021-12-23T18:44:01Z | 2021-12-23T18:44:01Z | OWNER | The example nginx config on https://docs.datasette.io/en/stable/deploying.html#nginx-proxy-configuration is currently: ``` daemon off; events { worker_connections 1024; } http { server { listen 80; location /my-datasette { proxy_pass http://127.0.0.1:8009/my-datasette; proxy_set_header Host $host; } } } ``` This looks to me like it might exhibit the bug. Need to confirm that and figure out an alternative. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Confirm if documented nginx proxy config works for row pages with escaped characters in their primary key 1087919372 | |
1000471371 | https://github.com/simonw/datasette/issues/1578#issuecomment-1000471371 | https://api.github.com/repos/simonw/datasette/issues/1578 | IC_kwDOBm6k_c47oftL | simonw 9599 | 2021-12-23T18:42:50Z | 2021-12-23T18:42:50Z | OWNER | Confirmed, that fixed the bug for me on my server. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Confirm if documented nginx proxy config works for row pages with escaped characters in their primary key 1087919372 | |
1000470652 | https://github.com/simonw/datasette/issues/1578#issuecomment-1000470652 | https://api.github.com/repos/simonw/datasette/issues/1578 | IC_kwDOBm6k_c47ofh8 | simonw 9599 | 2021-12-23T18:40:46Z | 2021-12-23T18:40:46Z | OWNER | This StackOverflow answer suggests that the fix is to change this:
To this:
Quoting the nginx documentation: http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Confirm if documented nginx proxy config works for row pages with escaped characters in their primary key 1087919372 | |
1000469107 | https://github.com/simonw/datasette/issues/1578#issuecomment-1000469107 | https://api.github.com/repos/simonw/datasette/issues/1578 | IC_kwDOBm6k_c47ofJz | simonw 9599 | 2021-12-23T18:36:38Z | 2021-12-23T18:36:38Z | OWNER | This problem doesn't occur on my
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Confirm if documented nginx proxy config works for row pages with escaped characters in their primary key 1087919372 | |
1000462309 | https://github.com/simonw/datasette/issues/1577#issuecomment-1000462309 | https://api.github.com/repos/simonw/datasette/issues/1577 | IC_kwDOBm6k_c47odfl | simonw 9599 | 2021-12-23T18:20:46Z | 2021-12-23T18:20:46Z | OWNER | There are a lot of improvements to |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Drop support for Python 3.6 1087913724 | |
1000461900 | https://github.com/simonw/datasette/issues/1577#issuecomment-1000461900 | https://api.github.com/repos/simonw/datasette/issues/1577 | IC_kwDOBm6k_c47odZM | simonw 9599 | 2021-12-23T18:19:44Z | 2021-12-23T18:19:44Z | OWNER | The 3.7 feature I want to use today is contextvars - but I have a workaround for the moment, see https://github.com/simonw/datasette/issues/1576#issuecomment-999987418 So I'm going to hold off on dropping 3.6 for a little bit longer. I imagine I'll drop it before Datasette 1.0 though. Leaving this issue open to gather thoughts and feedback on this issue from Datasette users and potential users. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Drop support for Python 3.6 1087913724 | |
1000461275 | https://github.com/simonw/datasette/issues/1577#issuecomment-1000461275 | https://api.github.com/repos/simonw/datasette/issues/1577 | IC_kwDOBm6k_c47odPb | simonw 9599 | 2021-12-23T18:18:11Z | 2021-12-23T18:18:11Z | OWNER | From the Twitter thread, there are still a decent amount of LTS Linux releases out there that are stuck on pre-3.7 Python. Though many of those are 3.5 and Datasette dropped support for 3.5 in November 2019: cf7776d36fbacefa874cbd6e5fcdc9fff7661203 |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Drop support for Python 3.6 1087913724 | |
999990414 | https://github.com/simonw/datasette/issues/1576#issuecomment-999990414 | https://api.github.com/repos/simonw/datasette/issues/1576 | IC_kwDOBm6k_c47mqSO | simonw 9599 | 2021-12-23T02:08:39Z | 2021-12-23T18:16:35Z | OWNER | It's tiny: I'm tempted to vendor it. https://github.com/Skyscanner/aiotask-context/blob/master/aiotask_context/init.py No, I'll add it as a pinned dependency, which I can then drop when I drop 3.6 support. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Traces should include SQL executed by subtasks created with `asyncio.gather` 1087181951 | |
999987418 | https://github.com/simonw/datasette/issues/1576#issuecomment-999987418 | https://api.github.com/repos/simonw/datasette/issues/1576 | IC_kwDOBm6k_c47mpja | simonw 9599 | 2021-12-23T01:59:58Z | 2021-12-23T02:02:12Z | OWNER | Another option: https://github.com/Skyscanner/aiotask-context - looks like it might be better as it's been updated for Python 3.7 in this commit https://github.com/Skyscanner/aiotask-context/commit/67108c91d2abb445655cc2af446fdb52ca7890c4 The Skyscanner one doesn't attempt to wrap any existing factories, but that's OK for my purposes since I don't need to handle arbitrary |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Traces should include SQL executed by subtasks created with `asyncio.gather` 1087181951 | |
999876666 | https://github.com/simonw/datasette/issues/1576#issuecomment-999876666 | https://api.github.com/repos/simonw/datasette/issues/1576 | IC_kwDOBm6k_c47mOg6 | simonw 9599 | 2021-12-22T20:59:22Z | 2021-12-22T21:18:09Z | OWNER | This article is relevant: Context information storage for asyncio - in particular the section https://blog.sqreen.com/asyncio/#context-inheritance-between-tasks which describes exactly the problem I have and their solution, which involves this trickery: ```python def request_task_factory(loop, coro): child_task = asyncio.tasks.Task(coro, loop=loop) parent_task = asyncio.Task.current_task(loop=loop) current_request = getattr(parent_task, 'current_request', None) setattr(child_task, 'current_request', current_request) return child_task loop = asyncio.get_event_loop() loop.set_task_factory(request_task_factory) ``` They released their solution as a library: https://pypi.org/project/aiocontext/ and https://github.com/sqreen/AioContext - but that company was acquired by Datadog back in April and doesn't seem to be actively maintaining their open source stuff any more: https://twitter.com/SqreenIO/status/1384906075506364417 |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Traces should include SQL executed by subtasks created with `asyncio.gather` 1087181951 | |
999878907 | https://github.com/simonw/datasette/issues/1576#issuecomment-999878907 | https://api.github.com/repos/simonw/datasette/issues/1576 | IC_kwDOBm6k_c47mPD7 | simonw 9599 | 2021-12-22T21:03:49Z | 2021-12-22T21:10:46Z | OWNER |
Python 3.6 support ends in a few days time, and it looks like Glitch has updated to 3.7 now - so maybe I can get away with Datasette needing 3.7 these days? Tweeted about that here: https://twitter.com/simonw/status/1473761478155010048 |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Traces should include SQL executed by subtasks created with `asyncio.gather` 1087181951 | |
999874886 | https://github.com/simonw/datasette/issues/1576#issuecomment-999874886 | https://api.github.com/repos/simonw/datasette/issues/1576 | IC_kwDOBm6k_c47mOFG | simonw 9599 | 2021-12-22T20:55:42Z | 2021-12-22T20:57:28Z | OWNER | One way to solve this would be to introduce a It would be really nice if I could solve this using |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Traces should include SQL executed by subtasks created with `asyncio.gather` 1087181951 | |
999874484 | https://github.com/simonw/datasette/issues/1576#issuecomment-999874484 | https://api.github.com/repos/simonw/datasette/issues/1576 | IC_kwDOBm6k_c47mN-0 | simonw 9599 | 2021-12-22T20:54:52Z | 2021-12-22T20:54:52Z | OWNER | Here's the full current relevant code from |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Traces should include SQL executed by subtasks created with `asyncio.gather` 1087181951 | |
999870993 | https://github.com/simonw/datasette/issues/1518#issuecomment-999870993 | https://api.github.com/repos/simonw/datasette/issues/1518 | IC_kwDOBm6k_c47mNIR | simonw 9599 | 2021-12-22T20:47:18Z | 2021-12-22T20:50:24Z | OWNER | The reason they aren't showing up in the traces is that traces are stored just for the currently executing This is so traces for other incoming requests don't end up mixed together. But there's no current mechanism to track async tasks that are effectively "child tasks" of the current request, and hence should be tracked the same. https://stackoverflow.com/a/69349501/6083 suggests that you pass the task ID as an argument to the child tasks that are executed using |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Complete refactor of TableView and table.html template 1058072543 | |
999870282 | https://github.com/simonw/datasette/issues/1518#issuecomment-999870282 | https://api.github.com/repos/simonw/datasette/issues/1518 | IC_kwDOBm6k_c47mM9K | simonw 9599 | 2021-12-22T20:45:56Z | 2021-12-22T20:46:08Z | OWNER |
I wrote code to execute those in parallel using ```diff diff --git a/datasette/views/table.py b/datasette/views/table.py index 9808fd2..ec9db64 100644 --- a/datasette/views/table.py +++ b/datasette/views/table.py @@ -1,3 +1,4 @@ +import asyncio import urllib import itertools import json @@ -615,44 +616,37 @@ class TableView(RowTableShared): if request.args.get("_timelimit"): extra_args["custom_time_limit"] = int(request.args.get("_timelimit"))
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Complete refactor of TableView and table.html template 1058072543 | |
999863269 | https://github.com/simonw/datasette/issues/1518#issuecomment-999863269 | https://api.github.com/repos/simonw/datasette/issues/1518 | IC_kwDOBm6k_c47mLPl | simonw 9599 | 2021-12-22T20:35:41Z | 2021-12-22T20:37:13Z | OWNER | It looks like the count has to be executed before facets can be, because the facet_class constructor needs that total count figure: https://github.com/simonw/datasette/blob/6b1384b2f529134998fb507e63307609a5b7f5c0/datasette/views/table.py#L660-L671 It's used in facet suggestion logic here: https://github.com/simonw/datasette/blob/ace86566b28280091b3844cf5fbecd20158e9004/datasette/facets.py#L172-L178 |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Complete refactor of TableView and table.html template 1058072543 | |
999850191 | https://github.com/simonw/datasette/issues/1518#issuecomment-999850191 | https://api.github.com/repos/simonw/datasette/issues/1518 | IC_kwDOBm6k_c47mIDP | simonw 9599 | 2021-12-22T20:29:38Z | 2021-12-22T20:29:38Z | OWNER | New short-term goal: get facets and suggested facets to execute in parallel with the main query. Generate a trace graph that proves that is happening using |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Complete refactor of TableView and table.html template 1058072543 | |
999837569 | https://github.com/simonw/datasette/issues/1518#issuecomment-999837569 | https://api.github.com/repos/simonw/datasette/issues/1518 | IC_kwDOBm6k_c47mE-B | simonw 9599 | 2021-12-22T20:15:45Z | 2021-12-22T20:15:45Z | OWNER | Also the whole |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Complete refactor of TableView and table.html template 1058072543 | |
999837220 | https://github.com/simonw/datasette/issues/1518#issuecomment-999837220 | https://api.github.com/repos/simonw/datasette/issues/1518 | IC_kwDOBm6k_c47mE4k | simonw 9599 | 2021-12-22T20:15:04Z | 2021-12-22T20:15:04Z | OWNER | I think I can move this much higher up in the method, it's a bit confusing having it half way through: https://github.com/simonw/datasette/blob/6b1384b2f529134998fb507e63307609a5b7f5c0/datasette/views/table.py#L414-L436 |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Complete refactor of TableView and table.html template 1058072543 | |
999831967 | https://github.com/simonw/datasette/issues/1518#issuecomment-999831967 | https://api.github.com/repos/simonw/datasette/issues/1518 | IC_kwDOBm6k_c47mDmf | simonw 9599 | 2021-12-22T20:04:47Z | 2021-12-22T20:10:11Z | OWNER | I think I might be able to clean up a lot of the stuff in here using the The catch with that hook - https://docs.datasette.io/en/stable/plugin_hooks.html#render-cell-value-column-table-database-datasette - is that it gets called for every single cell. I don't want the overhead of looking up the foreign key relationships etc once for every value in a specific column. But maybe I could extend the hook to include a shared cache that gets used for all of the cells in a specific table? Something like this:
It's a bit of a gross hack though, and would it ever be useful for plugins outside of the default plugin in Datasette which does the foreign key stuff? If I can think of one other potential application for this No, this optimization doesn't make sense: the most complex cell enrichment logic is the stuff that does a |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Complete refactor of TableView and table.html template 1058072543 | |
998354538 | https://github.com/simonw/datasette/pull/1554#issuecomment-998354538 | https://api.github.com/repos/simonw/datasette/issues/1554 | IC_kwDOBm6k_c47ga5q | simonw 9599 | 2021-12-20T23:52:04Z | 2021-12-20T23:52:04Z | OWNER | Abandoning this since it didn't work how I wanted. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
TableView refactor 1079129258 | |
997514220 | https://github.com/simonw/datasette/issues/1547#issuecomment-997514220 | https://api.github.com/repos/simonw/datasette/issues/1547 | IC_kwDOBm6k_c47dNvs | simonw 9599 | 2021-12-20T01:26:25Z | 2021-12-20T01:26:25Z | OWNER | OK, this should hopefully fix that for you:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Writable canned queries fail to load custom templates 1076388044 | |
997513369 | https://github.com/simonw/datasette/issues/1547#issuecomment-997513369 | https://api.github.com/repos/simonw/datasette/issues/1547 | IC_kwDOBm6k_c47dNiZ | simonw 9599 | 2021-12-20T01:24:43Z | 2021-12-20T01:24:43Z | OWNER | @wragge thanks, that's a bug! Working on that in #1575. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Writable canned queries fail to load custom templates 1076388044 | |
997513177 | https://github.com/simonw/datasette/issues/1575#issuecomment-997513177 | https://api.github.com/repos/simonw/datasette/issues/1575 | IC_kwDOBm6k_c47dNfZ | simonw 9599 | 2021-12-20T01:24:25Z | 2021-12-20T01:24:25Z | OWNER | Looks like |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
__call__() got an unexpected keyword argument 'specname' 1084257842 | |
997507074 | https://github.com/simonw/sqlite-utils/issues/356#issuecomment-997507074 | https://api.github.com/repos/simonw/sqlite-utils/issues/356 | IC_kwDOCGYnMM47dMAC | simonw 9599 | 2021-12-20T01:10:06Z | 2021-12-20T01:16:11Z | OWNER | Work-in-progress improved help: ``` Usage: sqlite-utils insert [OPTIONS] PATH TABLE FILE Insert records from FILE into a table, creating the table if it does not already exist. By default the input is expected to be a JSON array of objects. Or:
You can also use --convert to pass a fragment of Python code that will be used to convert each input. Your Python code will be passed a "row" variable representing the imported row, and can return a modified row. If you are using --lines your code will be passed a "line" variable, and for --all an "all" variable. Options: --pk TEXT Columns to use as the primary key, e.g. id --flatten Flatten nested JSON objects, so {"a": {"b": 1}} becomes {"a_b": 1} --nl Expect newline-delimited JSON -c, --csv Expect CSV input --tsv Expect TSV input --lines Treat each line as a single value called 'line' --all Treat input as a single value called 'all' --convert TEXT Python code to convert each item --import TEXT Python modules to import --delimiter TEXT Delimiter to use for CSV files --quotechar TEXT Quote character to use for CSV/TSV --sniff Detect delimiter and quote character --no-headers CSV file has no header row --batch-size INTEGER Commit every X records --alter Alter existing table to add any missing columns --not-null TEXT Columns that should be created as NOT NULL --default <TEXT TEXT>... Default value that should be set for a column --encoding TEXT Character encoding for input, defaults to utf-8 -d, --detect-types Detect types for columns in CSV/TSV data --load-extension TEXT SQLite extensions to load --silent Do not show progress bar --ignore Ignore records if pk already exists --replace Replace records if pk already exists --truncate Truncate table before inserting records, if table already exists -h, --help Show this message and exit. ``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
`sqlite-utils insert --convert` option 1077431957 | |
997508728 | https://github.com/simonw/sqlite-utils/issues/356#issuecomment-997508728 | https://api.github.com/repos/simonw/sqlite-utils/issues/356 | IC_kwDOCGYnMM47dMZ4 | simonw 9599 | 2021-12-20T01:14:43Z | 2021-12-20T01:14:43Z | OWNER | (This makes me want |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
`sqlite-utils insert --convert` option 1077431957 | |
997502242 | https://github.com/simonw/sqlite-utils/issues/163#issuecomment-997502242 | https://api.github.com/repos/simonw/sqlite-utils/issues/163 | IC_kwDOCGYnMM47dK0i | simonw 9599 | 2021-12-20T00:56:45Z | 2021-12-20T00:56:52Z | OWNER |
I implemented that in: - #251 |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Idea: conversions= could take Python functions 706001517 | |
997497262 | https://github.com/simonw/sqlite-utils/issues/356#issuecomment-997497262 | https://api.github.com/repos/simonw/sqlite-utils/issues/356 | IC_kwDOCGYnMM47dJmu | simonw 9599 | 2021-12-20T00:40:15Z | 2021-12-20T00:40:15Z | OWNER |
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
`sqlite-utils insert --convert` option 1077431957 | |
997496931 | https://github.com/simonw/sqlite-utils/issues/356#issuecomment-997496931 | https://api.github.com/repos/simonw/sqlite-utils/issues/356 | IC_kwDOCGYnMM47dJhj | simonw 9599 | 2021-12-20T00:39:14Z | 2021-12-20T00:39:52Z | OWNER | ``` % sqlite-utils insert --help Usage: sqlite-utils insert [OPTIONS] PATH TABLE JSON_FILE Insert records from JSON file into a table, creating the table if it does not already exist. Input should be a JSON array of objects, unless --nl or --csv is used. Options: --pk TEXT Columns to use as the primary key, e.g. id --nl Expect newline-delimited JSON --flatten Flatten nested JSON objects -c, --csv Expect CSV --tsv Expect TSV --convert TEXT Python code to convert each item --import TEXT Python modules to import --delimiter TEXT Delimiter to use for CSV files --quotechar TEXT Quote character to use for CSV/TSV --sniff Detect delimiter and quote character --no-headers CSV file has no header row --batch-size INTEGER Commit every X records --alter Alter existing table to add any missing columns --not-null TEXT Columns that should be created as NOT NULL --default <TEXT TEXT>... Default value that should be set for a column --encoding TEXT Character encoding for input, defaults to utf-8 -d, --detect-types Detect types for columns in CSV/TSV data --load-extension TEXT SQLite extensions to load --silent Do not show progress bar --ignore Ignore records if pk already exists --replace Replace records if pk already exists --truncate Truncate table before inserting records, if table already exists -h, --help Show this message and exit. ``` I can add a bunch of extra help at the top there to explain all of this stuff. That "Input should be a JSON array of objects" bit could be expanded to several paragraphs. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
`sqlite-utils insert --convert` option 1077431957 | |
997492872 | https://github.com/simonw/sqlite-utils/issues/356#issuecomment-997492872 | https://api.github.com/repos/simonw/sqlite-utils/issues/356 | IC_kwDOCGYnMM47dIiI | simonw 9599 | 2021-12-20T00:23:31Z | 2021-12-20T00:23:31Z | OWNER | I think this should work on JSON, or CSV, or individual lines, or the entire content at once. So I'll require What would |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
`sqlite-utils insert --convert` option 1077431957 | |
997486156 | https://github.com/simonw/sqlite-utils/issues/356#issuecomment-997486156 | https://api.github.com/repos/simonw/sqlite-utils/issues/356 | IC_kwDOCGYnMM47dG5M | simonw 9599 | 2021-12-19T23:51:02Z | 2021-12-19T23:51:02Z | OWNER | This is going to need a |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
`sqlite-utils insert --convert` option 1077431957 | |
997485361 | https://github.com/simonw/sqlite-utils/issues/356#issuecomment-997485361 | https://api.github.com/repos/simonw/sqlite-utils/issues/356 | IC_kwDOCGYnMM47dGsx | simonw 9599 | 2021-12-19T23:45:30Z | 2021-12-19T23:45:30Z | OWNER | Really interesting example input for this: https://blog.timac.org/2021/1219-state-of-swift-and-swiftui-ios15/iOS13.txt - see https://blog.timac.org/2021/1219-state-of-swift-and-swiftui-ios15/ |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
`sqlite-utils insert --convert` option 1077431957 | |
997474022 | https://github.com/simonw/datasette/issues/1565#issuecomment-997474022 | https://api.github.com/repos/simonw/datasette/issues/1565 | IC_kwDOBm6k_c47dD7m | simonw 9599 | 2021-12-19T22:36:49Z | 2021-12-19T22:37:29Z | OWNER | No way with a tagged template literal to pass an extra database name argument, so instead I need a method that returns a callable that can be used for the tagged template literal for a specific database - or the default database. This could work (bit weird looking though):
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Documented JavaScript variables on different templates made available for plugins 1083657868 | |
997473856 | https://github.com/simonw/datasette/issues/1565#issuecomment-997473856 | https://api.github.com/repos/simonw/datasette/issues/1565 | IC_kwDOBm6k_c47dD5A | simonw 9599 | 2021-12-19T22:35:20Z | 2021-12-19T22:35:20Z | OWNER | Quick prototype of that tagged template
var id = 4;
console.log(query |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Documented JavaScript variables on different templates made available for plugins 1083657868 | |
997472639 | https://github.com/simonw/datasette/issues/1565#issuecomment-997472639 | https://api.github.com/repos/simonw/datasette/issues/1565 | IC_kwDOBm6k_c47dDl_ | simonw 9599 | 2021-12-19T22:25:50Z | 2021-12-19T22:25:50Z | OWNER | Or...
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Documented JavaScript variables on different templates made available for plugins 1083657868 | |
997472509 | https://github.com/simonw/datasette/issues/1565#issuecomment-997472509 | https://api.github.com/repos/simonw/datasette/issues/1565 | IC_kwDOBm6k_c47dDj9 | simonw 9599 | 2021-12-19T22:24:50Z | 2021-12-19T22:24:50Z | OWNER | ... huh, it could even expose a JavaScript function that can be called to execute a SQL query.
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Documented JavaScript variables on different templates made available for plugins 1083657868 | |
997472370 | https://github.com/simonw/datasette/issues/1565#issuecomment-997472370 | https://api.github.com/repos/simonw/datasette/issues/1565 | IC_kwDOBm6k_c47dDhy | simonw 9599 | 2021-12-19T22:23:36Z | 2021-12-19T22:23:36Z | OWNER | This should also expose the JSON API endpoints used to execute SQL against this database. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Documented JavaScript variables on different templates made available for plugins 1083657868 | |
997472214 | https://github.com/simonw/datasette/issues/1518#issuecomment-997472214 | https://api.github.com/repos/simonw/datasette/issues/1518 | IC_kwDOBm6k_c47dDfW | simonw 9599 | 2021-12-19T22:22:08Z | 2021-12-19T22:22:08Z | OWNER | I sketched out a chained SQL builder pattern that might be useful for further tidying up this code - though with the new plugin hook I'm less excited about it than I was: ```python class TableQuery: def init(self, table, columns, pks, is_view=False, prev=None): self.table = table self.columns = columns self.pks = pks self.is_view = is_view self.prev = prev
'select count(*) from facetable where foo = bar and baz = 1'``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Complete refactor of TableView and table.html template 1058072543 | |
997471672 | https://github.com/simonw/datasette/issues/1547#issuecomment-997471672 | https://api.github.com/repos/simonw/datasette/issues/1547 | IC_kwDOBm6k_c47dDW4 | simonw 9599 | 2021-12-19T22:18:26Z | 2021-12-19T22:18:26Z | OWNER | I released this in an alpha, so you can try out this fix using:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Writable canned queries fail to load custom templates 1076388044 | |
997470633 | https://github.com/simonw/datasette/issues/1566#issuecomment-997470633 | https://api.github.com/repos/simonw/datasette/issues/1566 | IC_kwDOBm6k_c47dDGp | simonw 9599 | 2021-12-19T22:12:00Z | 2021-12-19T22:12:00Z | OWNER | Released another alpha, 0.60a1: https://github.com/simonw/datasette/releases/tag/0.60a1 |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Release Datasette 0.60 1083669410 | |
997462604 | https://github.com/simonw/datasette/issues/1545#issuecomment-997462604 | https://api.github.com/repos/simonw/datasette/issues/1545 | IC_kwDOBm6k_c47dBJM | simonw 9599 | 2021-12-19T21:17:08Z | 2021-12-19T21:17:08Z | OWNER | Here's the relevant code: https://github.com/simonw/datasette/blob/4094741c2881c2ada3f3f878b532fdaec7914953/datasette/app.py#L1204-L1219 It's using I need to get myself a proper Windows development environment setup to investigate this one. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Custom pages don't work on windows 1075893249 | |
997462117 | https://github.com/simonw/datasette/issues/1573#issuecomment-997462117 | https://api.github.com/repos/simonw/datasette/issues/1573 | IC_kwDOBm6k_c47dBBl | simonw 9599 | 2021-12-19T21:13:13Z | 2021-12-19T21:13:13Z | OWNER | This might also be the impetus I need to bring the https://datasette.io/plugins/datasette-pretty-traces plugin into Datasette core itself. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Make trace() a documented internal API 1084185188 | |
997460731 | https://github.com/simonw/datasette/issues/1547#issuecomment-997460731 | https://api.github.com/repos/simonw/datasette/issues/1547 | IC_kwDOBm6k_c47dAr7 | simonw 9599 | 2021-12-19T21:02:15Z | 2021-12-19T21:02:15Z | OWNER | Yes, this is a bug. It looks like the problem is with the Is missing this bit of code: |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Writable canned queries fail to load custom templates 1076388044 | |
997460061 | https://github.com/simonw/datasette/issues/1570#issuecomment-997460061 | https://api.github.com/repos/simonw/datasette/issues/1570 | IC_kwDOBm6k_c47dAhd | simonw 9599 | 2021-12-19T20:56:54Z | 2021-12-19T20:56:54Z | OWNER | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Separate db.execute_write() into three methods 1083921371 | ||
997459958 | https://github.com/simonw/datasette/issues/1555#issuecomment-997459958 | https://api.github.com/repos/simonw/datasette/issues/1555 | IC_kwDOBm6k_c47dAf2 | simonw 9599 | 2021-12-19T20:55:59Z | 2021-12-19T20:55:59Z | OWNER | Closing this issue because I've optimized this a whole bunch, and it's definitely good enough for the moment. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Optimize all those calls to index_list and foreign_key_list 1079149656 | |
997325189 | https://github.com/simonw/datasette/issues/1555#issuecomment-997325189 | https://api.github.com/repos/simonw/datasette/issues/1555 | IC_kwDOBm6k_c47cfmF | simonw 9599 | 2021-12-19T03:55:01Z | 2021-12-19T20:54:51Z | OWNER | It's a bit annoying that the queries no longer show up in the trace at all now, thanks to running in 5fac26aa221a111d7633f2dd92014641f7c0ade9 has the same problem. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Optimize all those calls to index_list and foreign_key_list 1079149656 | |
997459637 | https://github.com/simonw/datasette/issues/1555#issuecomment-997459637 | https://api.github.com/repos/simonw/datasette/issues/1555 | IC_kwDOBm6k_c47dAa1 | simonw 9599 | 2021-12-19T20:53:46Z | 2021-12-19T20:53:46Z | OWNER | Using #1571 showed me that the |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Optimize all those calls to index_list and foreign_key_list 1079149656 | |
997457790 | https://github.com/simonw/datasette/issues/1566#issuecomment-997457790 | https://api.github.com/repos/simonw/datasette/issues/1566 | IC_kwDOBm6k_c47c_9- | simonw 9599 | 2021-12-19T20:40:50Z | 2021-12-19T20:40:57Z | OWNER | Also release new version of |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Release Datasette 0.60 1083669410 | |
997342494 | https://github.com/simonw/datasette/issues/1555#issuecomment-997342494 | https://api.github.com/repos/simonw/datasette/issues/1555 | IC_kwDOBm6k_c47cj0e | simonw 9599 | 2021-12-19T07:22:04Z | 2021-12-19T07:22:04Z | OWNER | Another option would be to provide an abstraction that makes it easier to run a group of SQL queries in the same thread at the same time, and have them traced correctly. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Optimize all those calls to index_list and foreign_key_list 1079149656 | |
997324666 | https://github.com/simonw/datasette/issues/1555#issuecomment-997324666 | https://api.github.com/repos/simonw/datasette/issues/1555 | IC_kwDOBm6k_c47cfd6 | simonw 9599 | 2021-12-19T03:47:51Z | 2021-12-19T03:48:09Z | OWNER | Here's a hacked together prototype of running all of that stuff inside a single function passed to ```diff diff --git a/datasette/utils/internal_db.py b/datasette/utils/internal_db.py index 95055d8..58f9982 100644 --- a/datasette/utils/internal_db.py +++ b/datasette/utils/internal_db.py @@ -1,4 +1,5 @@ import textwrap +from datasette.utils import table_column_details async def init_internal_db(db): @@ -70,49 +71,70 @@ async def populate_schema_tables(internal_db, db): "DELETE FROM tables WHERE database_name = ?", [database_name], block=True ) tables = (await db.execute("select * from sqlite_master WHERE type = 'table'")).rows - tables_to_insert = [] - columns_to_delete = [] - columns_to_insert = [] - foreign_keys_to_delete = [] - foreign_keys_to_insert = [] - indexes_to_delete = [] - indexes_to_insert = []
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Optimize all those calls to index_list and foreign_key_list 1079149656 | |
997324156 | https://github.com/simonw/datasette/issues/1555#issuecomment-997324156 | https://api.github.com/repos/simonw/datasette/issues/1555 | IC_kwDOBm6k_c47cfV8 | simonw 9599 | 2021-12-19T03:40:05Z | 2021-12-19T03:40:05Z | OWNER | Using the prototype of this: - https://github.com/simonw/datasette-pretty-traces/issues/5 I'm seeing about 180ms spent running all of these queries on startup! |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Optimize all those calls to index_list and foreign_key_list 1079149656 | |
997321767 | https://github.com/simonw/datasette/issues/1555#issuecomment-997321767 | https://api.github.com/repos/simonw/datasette/issues/1555 | IC_kwDOBm6k_c47cewn | simonw 9599 | 2021-12-19T03:10:58Z | 2021-12-19T03:10:58Z | OWNER | I wonder how much overhead there is switching between the Would there be a performance boost if I gathered all of the column/index information in a single function run on the thread using Would be great to understand how much of an impact that would have. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Optimize all those calls to index_list and foreign_key_list 1079149656 | |
997321653 | https://github.com/simonw/datasette/issues/1555#issuecomment-997321653 | https://api.github.com/repos/simonw/datasette/issues/1555 | IC_kwDOBm6k_c47ceu1 | simonw 9599 | 2021-12-19T03:09:43Z | 2021-12-19T03:09:43Z | OWNER | On that same documentation page I just spotted this:
This makes me nervous to rely on pragma function optimizations in Datasette itself. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Optimize all those calls to index_list and foreign_key_list 1079149656 | |
997321477 | https://github.com/simonw/datasette/issues/1555#issuecomment-997321477 | https://api.github.com/repos/simonw/datasette/issues/1555 | IC_kwDOBm6k_c47cesF | simonw 9599 | 2021-12-19T03:07:33Z | 2021-12-19T03:07:33Z | OWNER | If I want to continue supporting SQLite prior to 3.16.0 (2017-01-02) I'll need this optimization to only kick in with versions that support table-valued PRAGMA functions, while keeping the old That's feasible, but it's a bit more work - and I need to make sure I have robust testing in place for SQLite 3.15.0. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Optimize all those calls to index_list and foreign_key_list 1079149656 | |
997321327 | https://github.com/simonw/datasette/issues/1555#issuecomment-997321327 | https://api.github.com/repos/simonw/datasette/issues/1555 | IC_kwDOBm6k_c47cepv | simonw 9599 | 2021-12-19T03:05:39Z | 2021-12-19T03:05:44Z | OWNER | This caught me out once before in: - https://github.com/simonw/datasette/issues/1276 Turns out Glitch was running SQLite 3.11.0 from 2016-02-15. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Optimize all those calls to index_list and foreign_key_list 1079149656 | |
997321217 | https://github.com/simonw/datasette/issues/1555#issuecomment-997321217 | https://api.github.com/repos/simonw/datasette/issues/1555 | IC_kwDOBm6k_c47ceoB | simonw 9599 | 2021-12-19T03:04:16Z | 2021-12-19T03:04:16Z | OWNER | One thing to watch out for though, from https://sqlite.org/pragma.html#pragfunc
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Optimize all those calls to index_list and foreign_key_list 1079149656 | |
997321115 | https://github.com/simonw/datasette/issues/1555#issuecomment-997321115 | https://api.github.com/repos/simonw/datasette/issues/1555 | IC_kwDOBm6k_c47cemb | simonw 9599 | 2021-12-19T03:03:12Z | 2021-12-19T03:03:12Z | OWNER | Table columns is a bit harder, because So if that function is available: https://latest.datasette.io/fixtures?sql=SELECT%0D%0A++sqlite_master.name%2C%0D%0A++table_xinfo.*%0D%0AFROM%0D%0A++sqlite_master%2C%0D%0A++pragma_table_xinfo%28sqlite_master.name%29+AS+table_xinfo%0D%0AWHERE%0D%0A++sqlite_master.type+%3D+%27table%27
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Optimize all those calls to index_list and foreign_key_list 1079149656 | |
997320824 | https://github.com/simonw/datasette/issues/1555#issuecomment-997320824 | https://api.github.com/repos/simonw/datasette/issues/1555 | IC_kwDOBm6k_c47ceh4 | simonw 9599 | 2021-12-19T02:59:57Z | 2021-12-19T03:00:44Z | OWNER |
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Optimize all those calls to index_list and foreign_key_list 1079149656 | |
997272328 | https://github.com/simonw/datasette/issues/1566#issuecomment-997272328 | https://api.github.com/repos/simonw/datasette/issues/1566 | IC_kwDOBm6k_c47cSsI | simonw 9599 | 2021-12-18T19:18:01Z | 2021-12-18T19:18:01Z | OWNER | Added some useful new documented internal methods in: - #1570 |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Release Datasette 0.60 1083669410 | |
997272223 | https://github.com/simonw/datasette/issues/1555#issuecomment-997272223 | https://api.github.com/repos/simonw/datasette/issues/1555 | IC_kwDOBm6k_c47cSqf | simonw 9599 | 2021-12-18T19:17:13Z | 2021-12-18T19:17:13Z | OWNER | That's a good optimization. Still need to deal with the huge flurry of |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Optimize all those calls to index_list and foreign_key_list 1079149656 | |
997267583 | https://github.com/simonw/datasette/issues/1570#issuecomment-997267583 | https://api.github.com/repos/simonw/datasette/issues/1570 | IC_kwDOBm6k_c47cRh_ | simonw 9599 | 2021-12-18T18:46:05Z | 2021-12-18T18:46:12Z | OWNER | This will replace the work done in #1569. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Separate db.execute_write() into three methods 1083921371 | |
997267416 | https://github.com/simonw/datasette/issues/1555#issuecomment-997267416 | https://api.github.com/repos/simonw/datasette/issues/1555 | IC_kwDOBm6k_c47cRfY | simonw 9599 | 2021-12-18T18:44:53Z | 2021-12-18T18:45:28Z | OWNER | Rather than adding a
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Optimize all those calls to index_list and foreign_key_list 1079149656 | |
997266687 | https://github.com/simonw/datasette/issues/1569#issuecomment-997266687 | https://api.github.com/repos/simonw/datasette/issues/1569 | IC_kwDOBm6k_c47cRT_ | simonw 9599 | 2021-12-18T18:41:40Z | 2021-12-18T18:41:40Z | OWNER | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
db.execute_write(..., executescript=True) parameter 1083895395 | ||
997266100 | https://github.com/simonw/datasette/issues/1555#issuecomment-997266100 | https://api.github.com/repos/simonw/datasette/issues/1555 | IC_kwDOBm6k_c47cRK0 | simonw 9599 | 2021-12-18T18:40:02Z | 2021-12-18T18:40:02Z | OWNER | The implementation of |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Optimize all those calls to index_list and foreign_key_list 1079149656 | |
997262475 | https://github.com/simonw/datasette/issues/1555#issuecomment-997262475 | https://api.github.com/repos/simonw/datasette/issues/1555 | IC_kwDOBm6k_c47cQSL | simonw 9599 | 2021-12-18T18:34:18Z | 2021-12-18T18:34:18Z | OWNER | Using |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Optimize all those calls to index_list and foreign_key_list 1079149656 | |
997249563 | https://github.com/simonw/datasette/issues/1569#issuecomment-997249563 | https://api.github.com/repos/simonw/datasette/issues/1569 | IC_kwDOBm6k_c47cNIb | simonw 9599 | 2021-12-18T18:21:23Z | 2021-12-18T18:21:23Z | OWNER | Goal here is to gain the ability to use https://docs.python.org/3/library/sqlite3.html#sqlite3.Cursor.executescript |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
db.execute_write(..., executescript=True) parameter 1083895395 | |
997248364 | https://github.com/simonw/datasette/issues/1555#issuecomment-997248364 | https://api.github.com/repos/simonw/datasette/issues/1555 | IC_kwDOBm6k_c47cM1s | simonw 9599 | 2021-12-18T18:20:10Z | 2021-12-18T18:20:10Z | OWNER | Idea: teach
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Optimize all those calls to index_list and foreign_key_list 1079149656 | |
997245301 | https://github.com/simonw/datasette/issues/1555#issuecomment-997245301 | https://api.github.com/repos/simonw/datasette/issues/1555 | IC_kwDOBm6k_c47cMF1 | simonw 9599 | 2021-12-18T18:17:04Z | 2021-12-18T18:17:04Z | OWNER | One downside of |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Optimize all those calls to index_list and foreign_key_list 1079149656 | |
997241969 | https://github.com/simonw/datasette/issues/1555#issuecomment-997241969 | https://api.github.com/repos/simonw/datasette/issues/1555 | IC_kwDOBm6k_c47cLRx | simonw 9599 | 2021-12-18T18:13:04Z | 2021-12-18T18:13:04Z | OWNER | Also: running all of those |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Optimize all those calls to index_list and foreign_key_list 1079149656 | |
997241645 | https://github.com/simonw/datasette/issues/1555#issuecomment-997241645 | https://api.github.com/repos/simonw/datasette/issues/1555 | IC_kwDOBm6k_c47cLMt | simonw 9599 | 2021-12-18T18:12:26Z | 2021-12-18T18:12:26Z | OWNER | A simpler optimization would be just to turn all of those column and index reads into a single efficient UNION query against each database, then figure out the most efficient pattern to send them all as writes in one go as opposed to calling |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Optimize all those calls to index_list and foreign_key_list 1079149656 | |
997235388 | https://github.com/simonw/datasette/issues/1566#issuecomment-997235388 | https://api.github.com/repos/simonw/datasette/issues/1566 | IC_kwDOBm6k_c47cJq8 | simonw 9599 | 2021-12-18T17:32:07Z | 2021-12-18T17:32:07Z | OWNER | I can release a new version of |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Release Datasette 0.60 1083669410 | |
997235086 | https://github.com/simonw/datasette/issues/1555#issuecomment-997235086 | https://api.github.com/repos/simonw/datasette/issues/1555 | IC_kwDOBm6k_c47cJmO | simonw 9599 | 2021-12-18T17:30:13Z | 2021-12-18T17:30:13Z | OWNER | Now that trace sees write queries (#1568) it's clear that there is a whole lot more DB activity then I had realized: |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Optimize all those calls to index_list and foreign_key_list 1079149656 | |
997234858 | https://github.com/simonw/datasette/issues/1555#issuecomment-997234858 | https://api.github.com/repos/simonw/datasette/issues/1555 | IC_kwDOBm6k_c47cJiq | simonw 9599 | 2021-12-18T17:28:44Z | 2021-12-18T17:28:44Z | OWNER | Maybe it would be worth exploring attaching each DB in turn to the _internal connection in order to perform these queries faster. I'm a bit worried about leaks though: the internal database isn't meant to be visible, even temporarily attaching another DB to it could cause SQL queries against that DB to be able to access the internal data. So maybe instead the _internal connection gets to connect to the other DBs? There's a maximum of ten there I think, which is good for most but not all cases. But the cases with the most connected databases will see the worst performance! |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Optimize all those calls to index_list and foreign_key_list 1079149656 | |
997153253 | https://github.com/simonw/datasette/issues/1568#issuecomment-997153253 | https://api.github.com/repos/simonw/datasette/issues/1568 | IC_kwDOBm6k_c47b1nl | simonw 9599 | 2021-12-18T06:20:23Z | 2021-12-18T06:20:23Z | OWNER | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Trace should show queries on the write connection too 1083726550 | ||
997128950 | https://github.com/simonw/datasette/issues/1568#issuecomment-997128950 | https://api.github.com/repos/simonw/datasette/issues/1568 | IC_kwDOBm6k_c47bvr2 | simonw 9599 | 2021-12-18T02:38:01Z | 2021-12-18T02:38:01Z | OWNER | Prototype: ```diff diff --git a/datasette/database.py b/datasette/database.py index 0a0c104..468e936 100644 --- a/datasette/database.py +++ b/datasette/database.py @@ -99,7 +99,9 @@ class Database: with conn: return conn.execute(sql, params or [])
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Trace should show queries on the write connection too 1083726550 | |
997128508 | https://github.com/simonw/datasette/issues/1555#issuecomment-997128508 | https://api.github.com/repos/simonw/datasette/issues/1555 | IC_kwDOBm6k_c47bvk8 | simonw 9599 | 2021-12-18T02:33:57Z | 2021-12-18T02:33:57Z | OWNER | Here's why - |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Optimize all those calls to index_list and foreign_key_list 1079149656 | |
997128368 | https://github.com/simonw/datasette/issues/1555#issuecomment-997128368 | https://api.github.com/repos/simonw/datasette/issues/1555 | IC_kwDOBm6k_c47bviw | simonw 9599 | 2021-12-18T02:32:43Z | 2021-12-18T02:32:43Z | OWNER | I wonder why the |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Optimize all those calls to index_list and foreign_key_list 1079149656 | |
997128251 | https://github.com/simonw/datasette/issues/1555#issuecomment-997128251 | https://api.github.com/repos/simonw/datasette/issues/1555 | IC_kwDOBm6k_c47bvg7 | simonw 9599 | 2021-12-18T02:31:51Z | 2021-12-18T02:31:51Z | OWNER | I was thinking it might even be possible to convert this into a But the |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Optimize all those calls to index_list and foreign_key_list 1079149656 | |
997128080 | https://github.com/simonw/datasette/issues/1555#issuecomment-997128080 | https://api.github.com/repos/simonw/datasette/issues/1555 | IC_kwDOBm6k_c47bveQ | simonw 9599 | 2021-12-18T02:30:19Z | 2021-12-18T02:30:19Z | OWNER | I think all of these queries happen in one place - in the |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Optimize all those calls to index_list and foreign_key_list 1079149656 | |
997127784 | https://github.com/simonw/datasette/issues/1561#issuecomment-997127784 | https://api.github.com/repos/simonw/datasette/issues/1561 | IC_kwDOBm6k_c47bvZo | simonw 9599 | 2021-12-18T02:27:56Z | 2021-12-18T02:27:56Z | OWNER | Oh that's an interesting solution, combining the hashes of all of the individual databases. I'm actually not a big fan of
I've since not found myself wanting to use it at all for any of my projects - which makes me nervous, because it means there's a pretty complex feature that I'm not using at all, so it's only really protected by the existing unit tests for it. What I'd really like to do is figure out how to have hashed URL mode work entirely as a plugin - then I could extract it from Datasette core entirely (which would simplify a bunch of stuff) but people who find the optimization useful would be able to access it. I'm not sure that the existing plugin hooks are robust enough to do that yet though. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
add hash id to "_memory" url if hashed url mode is turned on and crossdb is also turned on 1082765654 | |
997127084 | https://github.com/simonw/datasette/issues/1563#issuecomment-997127084 | https://api.github.com/repos/simonw/datasette/issues/1563 | IC_kwDOBm6k_c47bvOs | simonw 9599 | 2021-12-18T02:22:30Z | 2021-12-18T02:22:30Z | OWNER | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Datasette(... files=) should not be a required argument 1083573206 | ||
997125191 | https://github.com/simonw/datasette/issues/1563#issuecomment-997125191 | https://api.github.com/repos/simonw/datasette/issues/1563 | IC_kwDOBm6k_c47buxH | simonw 9599 | 2021-12-18T02:10:20Z | 2021-12-18T02:10:20Z | OWNER | I should document the usage of this constructor in https://docs.datasette.io/en/stable/internals.html#datasette-class |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Datasette(... files=) should not be a required argument 1083573206 | |
997124280 | https://github.com/simonw/datasette/issues/1546#issuecomment-997124280 | https://api.github.com/repos/simonw/datasette/issues/1546 | IC_kwDOBm6k_c47bui4 | simonw 9599 | 2021-12-18T02:05:16Z | 2021-12-18T02:05:16Z | OWNER | Sure - there are actually several levels to this. The code that creates connections to the database is this: https://github.com/simonw/datasette/blob/83bacfa9452babe7bd66e3579e23af988d00f6ac/datasette/database.py#L72-L95 For files on disk, it does this: ```python For read-only connectionsconn = sqlite3.connect( "file:my.db?mode=ro", uri=True, check_same_thread=False) For connections that should be treated as immutable:conn = sqlite3.connect( "file:my.db?immutable=1", uri=True, check_same_thread=False)
So this function runs against any incoming SQL to verify that it looks like a https://github.com/simonw/datasette/blob/83bacfa9452babe7bd66e3579e23af988d00f6ac/datasette/utils/init.py#L195-L204 You can see the tests for that here: https://github.com/simonw/datasette/blob/b1fed48a95516ae84c0f020582303ab50ab817e2/tests/test_utils.py#L136-L170 |
{ "total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 1, "rocket": 0, "eyes": 0 } |
validating the sql 1076057610 | |
997122938 | https://github.com/simonw/datasette/issues/1564#issuecomment-997122938 | https://api.github.com/repos/simonw/datasette/issues/1564 | IC_kwDOBm6k_c47buN6 | simonw 9599 | 2021-12-18T01:55:25Z | 2021-12-18T01:55:46Z | OWNER | Made this change while working on this issue: - #1567 I'm going to write a test for this that uses that |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
_prepare_connection not called on write connections 1083581011 |
Advanced export
JSON shape: default, array, newline-delimited, object
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]);
issue >1000