issue_comments
58 rows where "updated_at" is on date 2022-11-16 sorted by updated_at descending
This data as json, CSV (advanced)
Suggested facets: issue_url, reactions, created_at (date), updated_at (date)
user 5
- simonw 38
- bgrins 17
- rtanglao 1
- amitkoth 1
- codecov[bot] 1
id | html_url | issue_url | node_id | user | created_at | updated_at ▲ | author_association | body | reactions | issue | performed_via_github_app |
---|---|---|---|---|---|---|---|---|---|---|---|
1317840727 | https://github.com/simonw/datasette/issues/1897#issuecomment-1317840727 | https://api.github.com/repos/simonw/datasette/issues/1897 | IC_kwDOBm6k_c5OjKdX | simonw 9599 | 2022-11-16T23:57:52Z | 2022-11-16T23:57:52Z | OWNER | In terms of permissions: if you have |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Serve schema JSON to the SQL editor to enable autocomplete 1452457263 | |
1317839781 | https://github.com/simonw/datasette/issues/1897#issuecomment-1317839781 | https://api.github.com/repos/simonw/datasette/issues/1897 | IC_kwDOBm6k_c5OjKOl | simonw 9599 | 2022-11-16T23:56:47Z | 2022-11-16T23:56:47Z | OWNER | I'm going to call this |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Serve schema JSON to the SQL editor to enable autocomplete 1452457263 | |
1317838892 | https://github.com/simonw/datasette/issues/1897#issuecomment-1317838892 | https://api.github.com/repos/simonw/datasette/issues/1897 | IC_kwDOBm6k_c5OjKAs | simonw 9599 | 2022-11-16T23:55:42Z | 2022-11-16T23:55:42Z | OWNER | Here's where the schema is hard-coded at the moment: https://github.com/simonw/datasette/blob/00e233d7a7f6443cb95fb5227c23580c48551cad/datasette/templates/_codemirror_foot.html#L2-L7 I figured out how to extract that data from the Although that used JSON functions which may (in a real edge-case) not be available in the version of SQLite that Datasette is running on, so probably going to use a regular SQL query and then assemble the JSON separately. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Serve schema JSON to the SQL editor to enable autocomplete 1452457263 | |
1317837416 | https://github.com/simonw/datasette/pull/1893#issuecomment-1317837416 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5OjJpo | simonw 9599 | 2022-11-16T23:54:02Z | 2022-11-16T23:54:02Z | OWNER | I'm going to tackle #1897 in the next few minutes. Tests failed due to Prettier check, just pushed a fix so it would ignore |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1317834838 | https://github.com/simonw/datasette/pull/1893#issuecomment-1317834838 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5OjJBW | bgrins 95570 | 2022-11-16T23:50:58Z | 2022-11-16T23:50:58Z | CONTRIBUTOR | Should we empty out the fixture schema to avoid fixture autocomplete showing up on live databases in the interim, or are you planning to tackle #1897 shortly? |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1317831555 | https://github.com/simonw/datasette/pull/1893#issuecomment-1317831555 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5OjIOD | simonw 9599 | 2022-11-16T23:47:13Z | 2022-11-16T23:47:13Z | OWNER | I'll open a follow-up issue to fix the schema. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1317831425 | https://github.com/simonw/datasette/pull/1893#issuecomment-1317831425 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5OjIMB | simonw 9599 | 2022-11-16T23:47:05Z | 2022-11-16T23:47:05Z | OWNER | OK, let's do it! Thanks so much for this. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1317829214 | https://github.com/simonw/datasette/pull/1893#issuecomment-1317829214 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5OjHpe | simonw 9599 | 2022-11-16T23:44:36Z | 2022-11-16T23:44:36Z | OWNER | Deployed that to https://datasette-pr-1893.vercel.app/fixtures - looks good to me! |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1316297347 | https://github.com/simonw/datasette/pull/1893#issuecomment-1316297347 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5OdRqD | codecov[bot] 22429695 | 2022-11-16T04:05:12Z | 2022-11-16T23:27:45Z | NONE | Codecov ReportBase: 92.55% // Head: 92.55% // No change to project coverage :thumbsup:
Additional details and impacted files```diff @@ Coverage Diff @@ ## main #1893 +/- ## ======================================= Coverage 92.55% 92.55% ======================================= Files 35 35 Lines 4432 4432 ======================================= Hits 4102 4102 Misses 330 330 ``` Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison):umbrella: View full report at Codecov. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1317805482 | https://github.com/simonw/datasette/pull/1893#issuecomment-1317805482 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5OjB2q | bgrins 95570 | 2022-11-16T23:18:17Z | 2022-11-16T23:18:17Z | CONTRIBUTOR | Alright with https://github.com/simonw/datasette/pull/1893/commits/f254be4b38936e95e7a7f25866e7c6b0520db96f we should be getting autocomplete on fixture data. Give that a test and see what you think |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1317797044 | https://github.com/simonw/datasette/pull/1893#issuecomment-1317797044 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5Oi_y0 | simonw 9599 | 2022-11-16T23:08:34Z | 2022-11-16T23:08:34Z | OWNER |
Yeah, push that up. I'm happy to wire in the query right after we land this. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1317789308 | https://github.com/simonw/datasette/pull/1893#issuecomment-1317789308 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5Oi958 | bgrins 95570 | 2022-11-16T22:59:57Z | 2022-11-16T22:59:57Z | CONTRIBUTOR | I can push up a commit that uses the static fixtures schema for testing, but given that the query used to generate it is authed we would still need some work to make that work on live data, right? Ideally it could come down to db and query views directly to avoid waiting on an extra xhr and managing that state change.On Nov 16, 2022, at 2:16 PM, Simon Willison @.***> wrote: Honestly I'm not too bothered if table names with weird characters don't work correctly here - I care about those in the Datasette fixtures.db database because Datasette aims to support ANY valid SQLite database, so I need stuff in the test suite that includes weird edge cases like this. But I would hope very few people actually create tables with spaces in their names, so it's not a huge concern to me if autocompletion doesn't work properly for those. —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***> |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1317757112 | https://github.com/simonw/datasette/issues/1896#issuecomment-1317757112 | https://api.github.com/repos/simonw/datasette/issues/1896 | IC_kwDOBm6k_c5Oi2C4 | simonw 9599 | 2022-11-16T22:26:52Z | 2022-11-16T22:33:13Z | OWNER | Some ideas from walking the dog: Challenge: standard URL routing of request to database/table/row Standardize on the named components of the URL patterns - Async function that takes the request and the Datasette instance and returns a Resolved instance with:
await datasette.resolve_request(request)
Methods raise |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Extract logic for resolving a URL to a database / table / row 1452364777 | |
1317755263 | https://github.com/simonw/datasette/issues/1863#issuecomment-1317755263 | https://api.github.com/repos/simonw/datasette/issues/1863 | IC_kwDOBm6k_c5Oi1l_ | simonw 9599 | 2022-11-16T22:24:59Z | 2022-11-16T22:24:59Z | OWNER | In trying to write this I realize that there's a lot of duplicated code with delete row, specifically around resolving the incoming URL into a row (or a database or a table). Since this is so common, I think it's worth extracting the logic out first. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Update a single record in an existing table 1425029242 | |
1317746206 | https://github.com/simonw/datasette/pull/1893#issuecomment-1317746206 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5OizYe | simonw 9599 | 2022-11-16T22:17:24Z | 2022-11-16T22:17:24Z | OWNER | Deployed 0a649e8f78c23e8db6869442eeb0dfe36a5443da: https://datasette-pr-1893.vercel.app/fixtures |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1317744563 | https://github.com/simonw/datasette/pull/1893#issuecomment-1317744563 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5Oiy-z | simonw 9599 | 2022-11-16T22:16:03Z | 2022-11-16T22:16:03Z | OWNER | Honestly I'm not too bothered if table names with weird characters don't work correctly here - I care about those in the Datasette |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1317715580 | https://github.com/simonw/datasette/pull/1893#issuecomment-1317715580 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5Oir58 | bgrins 95570 | 2022-11-16T21:49:51Z | 2022-11-16T21:49:51Z | CONTRIBUTOR | I think the table completion still has some quirks to work out. Something like
Seems to work alright, although it will append it after any other numbers you've started typing - so you end up with You can do
Which is pretty neat and will show the non-escaped string but complete to the escaped one. You can't easily do that with the table names themselves (you can pass a It's buggy enough (bad output for these unusual table names) that I'd suggest that work gets moved into a follow up to the upgrade to 6. That would give space to sort out how to deliver that to the view directly, figure out where name escaping should happen, and have overall testing to uncover bugs and fix papercuts before enabling it. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1317681193 | https://github.com/simonw/datasette/pull/1893#issuecomment-1317681193 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5Oijgp | bgrins 95570 | 2022-11-16T21:19:13Z | 2022-11-16T21:19:13Z | CONTRIBUTOR | Alright, added Cmd+Enter to submit (Ctrl+Enter on Windows as well bc of using Meta-Enter on codemirror). We can make that MacOS only by changing the combo to Cmd+Enter specifically but I think it's probably fine to have both. |
{ "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1317522323 | https://github.com/simonw/datasette/pull/1893#issuecomment-1317522323 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5Oh8uT | bgrins 95570 | 2022-11-16T18:59:49Z | 2022-11-16T18:59:49Z | CONTRIBUTOR | Or I guess you could return only the escaped table name and then we could derive the unescaped from the client side (removing the outer |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1317520304 | https://github.com/simonw/datasette/pull/1893#issuecomment-1317520304 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5Oh8Ow | bgrins 95570 | 2022-11-16T18:58:43Z | 2022-11-16T18:58:43Z | CONTRIBUTOR | Nice. And is it possible to include another field which is an escaped table name (only when necessary) - i.e. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1317475720 | https://github.com/simonw/datasette/pull/1893#issuecomment-1317475720 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5OhxWI | simonw 9599 | 2022-11-16T18:25:16Z | 2022-11-16T18:25:16Z | OWNER | Here's a query that returns the exact JSON we need to pass to the schema:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1317465874 | https://github.com/simonw/datasette/pull/1893#issuecomment-1317465874 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5Ohu8S | simonw 9599 | 2022-11-16T18:21:17Z | 2022-11-16T18:21:54Z | OWNER | I was worrying about the server-side overhead of collecting together all of the tables and column names for databases that might have hundreds of tables... but then I remember that I built the https://latest.datasette.io/login-as-root and then visit this page for an example query: https://latest.datasette.io/_internal?sql=select%0D%0A++database_name%2C%0D%0A++table_name%2C%0D%0A++json_group_array%28name%29%0D%0Afrom%0D%0A++columns%0D%0Awhere%0D%0A++database_name+%21%3D+%27_internal%27%0D%0Agroup+by%0D%0A++database_name%2C%0D%0A++table_name
database_name | table_name | json_group_array(name) -- | -- | -- extra_database | searchable | ["pk","text1","text2"] extra_database | searchable_fts | ["__langid","content","docid","searchable_fts","text1","text2"] extra_database | searchable_fts_content | ["c0text1","c1text2","c2content","docid"] extra_database | searchable_fts_segdir | ["end_block","idx","leaves_end_block","level","root","start_block"] extra_database | searchable_fts_segments | ["block","blockid"] fixtures | 123_starts_with_digits | ["content"] fixtures | Table With Space In Name | ["content","pk"] fixtures | attraction_characteristic | ["name","pk"] fixtures | binary_data | ["data"] fixtures | complex_foreign_keys | ["f1","f2","f3","pk"] fixtures | compound_primary_key | ["content","pk1","pk2"] |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1317456909 | https://github.com/simonw/datasette/pull/1893#issuecomment-1317456909 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5OhswN | simonw 9599 | 2022-11-16T18:17:39Z | 2022-11-16T18:17:39Z | OWNER | Tiny feature request (since you're in this code already) - I keep hitting Command+Enter on my macOS keyboard to submit the query, but the correct shortcut is Shift+Enter. Would be great if both worked! |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1317452541 | https://github.com/simonw/datasette/pull/1893#issuecomment-1317452541 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5Ohrr9 | simonw 9599 | 2022-11-16T18:15:52Z | 2022-11-16T18:15:52Z | OWNER | Deployed latest copy with:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1317449610 | https://github.com/simonw/datasette/pull/1893#issuecomment-1317449610 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5Ohq-K | simonw 9599 | 2022-11-16T18:14:28Z | 2022-11-16T18:14:28Z | OWNER |
Huh, yeah we should definitely have |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1317420812 | https://github.com/simonw/datasette/issues/1880#issuecomment-1317420812 | https://api.github.com/repos/simonw/datasette/issues/1880 | IC_kwDOBm6k_c5Ohj8M | amitkoth 525934 | 2022-11-16T17:50:29Z | 2022-11-16T17:50:29Z | NONE | I appreciate your response @simonw - thanks! I'll clarify what we need further - let's imagine we have 2000 SQLLite databases (for 2000 tenants), but we only want to run one datasette instance for each of those tenants to query/use datasette against their own database only. This means the "connection" between datasette and the SQLLite database would be dynamic, based on the tenantID that's required on an incoming request. Is there any specific config or other considerations in this use case, to minimize memory use on a single, efficient VM and serve queries to all these tenants? cc @muadham |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Datasette with many and large databases > Memory use 1433576351 | |
1317329157 | https://github.com/simonw/datasette/pull/1893#issuecomment-1317329157 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5OhNkF | bgrins 95570 | 2022-11-16T16:46:52Z | 2022-11-16T16:46:52Z | CONTRIBUTOR |
I checked and if I empty out app.css the bug goes away, so there's some kind of inheritance issue there. It's hard to debug bc the autocomplete popup goes away on blur (i.e. when trying to inspect it in devtools), but at least it's narrowed down a bit. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1317326406 | https://github.com/simonw/datasette/pull/1893#issuecomment-1317326406 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5OhM5G | bgrins 95570 | 2022-11-16T16:45:09Z | 2022-11-16T16:45:09Z | CONTRIBUTOR | For escaped table names it looks like we could pass a Completion object (https://codemirror.net/docs/ref/#autocomplete) instead of a string which would allow the non escaped name to be a label and then the escaped name to actually complete in the editor, which might help with some of the funkiness I was seeing w/ completion |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1317314064 | https://github.com/simonw/datasette/pull/1893#issuecomment-1317314064 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5OhJ4Q | bgrins 95570 | 2022-11-16T16:36:46Z | 2022-11-16T16:36:46Z | CONTRIBUTOR | With
we get table autocompletion and column completion if you name the table in the query (see screencast). I do see bugs with escaped table names like https://user-images.githubusercontent.com/95570/202238521-e613b4e2-ba92-4418-9068-fc022edaee93.mp4 |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1317281292 | https://github.com/simonw/datasette/pull/1893#issuecomment-1317281292 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5OhB4M | bgrins 95570 | 2022-11-16T16:19:16Z | 2022-11-16T16:19:16Z | CONTRIBUTOR | Ha, nice idea! Updating the dialect with that list. I'm thinking of also adding |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1316530539 | https://github.com/simonw/sqlite-utils/issues/512#issuecomment-1316530539 | https://api.github.com/repos/simonw/sqlite-utils/issues/512 | IC_kwDOCGYnMM5OeKlr | simonw 9599 | 2022-11-16T07:49:50Z | 2022-11-16T07:49:50Z | OWNER | Tests passed. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
mypy failures in CI 1450952393 | |
1316447182 | https://github.com/simonw/sqlite-utils/issues/512#issuecomment-1316447182 | https://api.github.com/repos/simonw/sqlite-utils/issues/512 | IC_kwDOCGYnMM5Od2PO | simonw 9599 | 2022-11-16T06:32:31Z | 2022-11-16T06:32:31Z | OWNER | Test failed again: https://github.com/simonw/sqlite-utils/actions/runs/3476950474/jobs/5812663096
That looks like an intermittent error. I'll try running it again in the morning. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
mypy failures in CI 1450952393 | |
1316437748 | https://github.com/simonw/sqlite-utils/issues/512#issuecomment-1316437748 | https://api.github.com/repos/simonw/sqlite-utils/issues/512 | IC_kwDOCGYnMM5Odz70 | simonw 9599 | 2022-11-16T06:24:31Z | 2022-11-16T06:24:31Z | OWNER |
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
mypy failures in CI 1450952393 | |
1316412234 | https://github.com/simonw/datasette/pull/1893#issuecomment-1316412234 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5OdttK | simonw 9599 | 2022-11-16T06:00:39Z | 2022-11-16T06:01:36Z | OWNER | Should note though that this is a classic example of GPT-3 making stuff up in places.
So let's drop We should drop |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1316401895 | https://github.com/simonw/datasette/pull/1893#issuecomment-1316401895 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5OdrLn | simonw 9599 | 2022-11-16T05:50:40Z | 2022-11-16T05:50:40Z | OWNER | So I think our dialect (at least to start with) should be:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1316400688 | https://github.com/simonw/datasette/pull/1893#issuecomment-1316400688 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5Odq4w | simonw 9599 | 2022-11-16T05:49:31Z | 2022-11-16T05:49:31Z | OWNER | OK, I decided to play around with GPT-3 for this. https://beta.openai.com/playground I prompted: ``` For each keyword say it it can be used in a SQLite select statement: and as asc between by case cast cross current current_date current_time current_timestamp desc detach distinct each else end escape except exclude exclusive exists explain fail filter first following for foreign from full generated glob group groups having if ignore immediate in index indexed initially inner insert instead intersect into is isnull join key last left like limit match materialized natural no not nothing notnull null nulls of offset on or order others outer over partition plan pragma preceding primary query raise range recursive references regexp reindex release rename replace restrict returning right rollback row rows savepoint select set table temp temporary then ties to transaction trigger unbounded union unique update using vacuum values view virtual when where window with without
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1316387382 | https://github.com/simonw/datasette/pull/1893#issuecomment-1316387382 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5Odno2 | bgrins 95570 | 2022-11-16T05:33:55Z | 2022-11-16T05:33:55Z | CONTRIBUTOR | I added a commit to make our own dialect at https://github.com/simonw/datasette/pull/1893/commits/e273fc8ed5341bdf0b622e722d761bd2acc30a90. Pulled in the full list of keywords from https://www.sqlite.org/lang_keywords.html but haven't gone through and pruned it to only include common select keywords. @simonw you'll have better knowledge than me on that - do you want to take a first shot at narrowing that down to the set that people will be using in the editor? |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1316340865 | https://github.com/simonw/datasette/pull/1893#issuecomment-1316340865 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5OdcSB | simonw 9599 | 2022-11-16T04:49:30Z | 2022-11-16T04:49:43Z | OWNER |
If you can come up with a static example JSON data structure example that does the right thing, I'm happy to refactor QueryView to make that available to the template - or even have a separate |
{ "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1316339035 | https://github.com/simonw/datasette/pull/1893#issuecomment-1316339035 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5Odb1b | bgrins 95570 | 2022-11-16T04:47:11Z | 2022-11-16T04:47:11Z | CONTRIBUTOR |
I was thinking of the BigQuery console, like But they must be doing something pretty custom & appears to be using Monaco anyway. I suspect some kind of lower level autocomplete integration could make this work, but if the table completion is a good-enough starting point I think it's not too hard. The main issue is that we don't pass the relevant table data down to QueryView. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1316320521 | https://github.com/simonw/datasette/pull/1893#issuecomment-1316320521 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5OdXUJ | bgrins 95570 | 2022-11-16T04:29:23Z | 2022-11-16T04:29:23Z | CONTRIBUTOR | UI issue I see on the autocomplete popup with overlapping icon & text. Screenshot's from Firefox, it seems even a little more pronounced on Safari |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1316318961 | https://github.com/simonw/datasette/pull/1893#issuecomment-1316318961 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5OdW7x | bgrins 95570 | 2022-11-16T04:27:51Z | 2022-11-16T04:27:51Z | CONTRIBUTOR |
The default focus styles appear to be
Which I also see on desktop. Would be nice to changed to whatever the default UA textarea styles are to blend in better but I wouldn't recommend removing it entirely - just to keep the visual indication that the element is focused. Maybe followup material to have a theming pass |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1316294156 | https://github.com/simonw/datasette/pull/1893#issuecomment-1316294156 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5OdQ4M | simonw 9599 | 2022-11-16T04:00:12Z | 2022-11-16T04:00:12Z | OWNER | Have you ever seen CodeMirror correctly auto-completing columns? I'm not entirely sure I believe that the feature works anywhere else. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1316293353 | https://github.com/simonw/datasette/pull/1893#issuecomment-1316293353 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5OdQrp | simonw 9599 | 2022-11-16T03:59:03Z | 2022-11-16T03:59:03Z | OWNER | Deployed a fresh copy:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1316289392 | https://github.com/simonw/datasette/issues/1886#issuecomment-1316289392 | https://api.github.com/repos/simonw/datasette/issues/1886 | IC_kwDOBm6k_c5OdPtw | rtanglao 45195 | 2022-11-16T03:54:17Z | 2022-11-16T03:58:56Z | NONE | Happy Birthday Datasette! Thanks Simon!! I use datasette on everything most notably my flickr metadata SQLite DB to make art. Datasette lite on my 2019 flickr metadata is super helpful too: https://lite.datasette.io/?csv=https%3A%2F%2Fraw.githubusercontent.com%2Frtanglao%2Frt-flickr-sqlite-csv%2Fmain%2F2019-roland-flickr-metadata.csv Even better datasette lite on all firefox support questions from 2021: https://lite.datasette.io/?url=https%3A%2F%2Fraw.githubusercontent.com%2Frtanglao%2Frt-kits-api3%2Fmain%2FYEARLY_CSV_FILES%2F2021-firefox-sumo-questions.db Thanks again Simon! So great! What a gift to the world!!!!!! |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Call for birthday presents: if you're using Datasette, let us know how you're using it here 1447050738 | |
1316262169 | https://github.com/simonw/datasette/issues/1890#issuecomment-1316262169 | https://api.github.com/repos/simonw/datasette/issues/1890 | IC_kwDOBm6k_c5OdJEZ | simonw 9599 | 2022-11-16T03:22:40Z | 2022-11-16T03:22:40Z | OWNER | Actually this works as it should in desktop Safari: I'm going to just put up with the weird behaviour in Mobile Safari. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Autocomplete text entry for filter values that correspond to facets 1448143294 | |
1316256386 | https://github.com/simonw/datasette/pull/1893#issuecomment-1316256386 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5OdHqC | bgrins 95570 | 2022-11-16T03:18:06Z | 2022-11-16T03:18:06Z | CONTRIBUTOR |
This version "sort of" works when on the main database page where the template passes the relevant data https://github.com/bgrins/datasette/commit/8431c98850c7a552dbcde2a4dd0c3dc942a97d25 by doing this and passing that into the ```
let TABLES_DATA = [];
{% if tables is defined %} // Turn into an object, shaped like https://github.com/codemirror/lang-sql/blob/ebf115fffdbe07f91465ccbd82868c587f8182bc/test/test-complete.ts#L27. const TABLES_SCHEMA = Object.fromEntries( new Map( TABLES_DATA.map((table) => { return [table.name, table.columns]; }) ).entries() ); ``` But there are a number of papercuts with it - it's not escaping table names with spaces (likely be fixable from the data being passed into the view) but mainly it doesn't seem to autocomplete columns. I think it might only want to do it when you first type the table name from my read of https://github.com/codemirror/lang-sql/blob/ebf115fffdbe07f91465ccbd82868c587f8182bc/test/test-complete.ts#L37. It's possible I'm just passing something wrong, but it may end up being something that needs feature work upstream. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1316253186 | https://github.com/simonw/datasette/pull/1893#issuecomment-1316253186 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5OdG4C | simonw 9599 | 2022-11-16T03:16:36Z | 2022-11-16T03:16:36Z | OWNER | Yeah I haven't written this down anywhere but Datasette definitely has an undocumented preference for lower-case SQL. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1316242752 | https://github.com/simonw/datasette/issues/1890#issuecomment-1316242752 | https://api.github.com/repos/simonw/datasette/issues/1890 | IC_kwDOBm6k_c5OdEVA | simonw 9599 | 2022-11-16T03:10:52Z | 2022-11-16T03:12:47Z | OWNER | https://bugs.webkit.org/show_bug.cgi?id=201768 - " Datalist option's label not used" - marked as RESOLVED FIXED on March 31st 2020. The commit: https://trac.webkit.org/changeset/259330/webkit And here's the test mirrored on GitHub: https://cs.github.com/qtwebkit/webkit-mirror/blob/cc3fcd0b4bad1f7cf77c26e34aa01d16618d6d5e/LayoutTests/fast/forms/datalist/datalist-option-labels.html?q=datalist-option-labels.html |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Autocomplete text entry for filter values that correspond to facets 1448143294 | |
1316243602 | https://github.com/simonw/datasette/pull/1893#issuecomment-1316243602 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5OdEiS | bgrins 95570 | 2022-11-16T03:11:46Z | 2022-11-16T03:11:46Z | CONTRIBUTOR | Was just reviewing the SQL options and there's an upperCaseKeywords if we'd rather have SELECT vs select. Datasette seems to prefer lowercase so probably best to keep it as-is |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1316240839 | https://github.com/simonw/datasette/issues/1890#issuecomment-1316240839 | https://api.github.com/repos/simonw/datasette/issues/1890 | IC_kwDOBm6k_c5OdD3H | simonw 9599 | 2022-11-16T03:09:11Z | 2022-11-16T03:09:11Z | OWNER | Here's a polyfill for It shouldn't be necessary now that Safari has shipped support (apparently added in https://developer.apple.com/documentation/safari-release-notes/safari-12_1-release-notes#3130314 Safari 12.1 in March 2019). But it does look like Safari doesn't support differing |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Autocomplete text entry for filter values that correspond to facets 1448143294 | |
1316236448 | https://github.com/simonw/datasette/pull/1893#issuecomment-1316236448 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5OdCyg | simonw 9599 | 2022-11-16T03:04:57Z | 2022-11-16T03:04:57Z | OWNER | If you rebase from |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1316233532 | https://github.com/simonw/datasette/issues/1890#issuecomment-1316233532 | https://api.github.com/repos/simonw/datasette/issues/1890 | IC_kwDOBm6k_c5OdCE8 | simonw 9599 | 2022-11-16T03:00:58Z | 2022-11-16T03:00:58Z | OWNER | Oops, introduced a test failure: ``` def test_table_html_foreign_key_facets(app_client): response = app_client.get( "/fixtures/foreign_key_references?_facet=foreign_key_with_blank_label" ) assert response.status == 200
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Autocomplete text entry for filter values that correspond to facets 1448143294 | |
1316232588 | https://github.com/simonw/datasette/pull/1893#issuecomment-1316232588 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5OdB2M | simonw 9599 | 2022-11-16T03:00:04Z | 2022-11-16T03:00:04Z | OWNER | Oops, the tests are failing because of a test failure I introduced here: - #1890 |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1316231560 | https://github.com/simonw/datasette/pull/1893#issuecomment-1316231560 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5OdBmI | simonw 9599 | 2022-11-16T02:59:00Z | 2022-11-16T02:59:00Z | OWNER | The resize handle doesn't appear on Mobile Safari on iPhone - I don't think that particularly matters though. The textarea does get a weird border around it when focused on iPhone though. Focused: Not focused: |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1316227073 | https://github.com/simonw/datasette/pull/1893#issuecomment-1316227073 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5OdAgB | simonw 9599 | 2022-11-16T02:54:22Z | 2022-11-16T02:54:32Z | OWNER | If you can get a version of this working with table and column autocompletion just using a static JavaScript object in the source code with the right tables and columns, I'm happy to take on the work of turning that static object into something that Datasette includes in the page itself with all of the correct values. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1316141764 | https://github.com/simonw/datasette/pull/1893#issuecomment-1316141764 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5OcrrE | simonw 9599 | 2022-11-16T01:26:59Z | 2022-11-16T01:26:59Z | OWNER | Resizing works great for me - and the page automatically sizes the editor to fit an existing query, e.g. on https://datasette-pr-1893.vercel.app/fixtures?sql=select+id%2C+content%2C+content2%0D%0A++from+primary_key_multiple_columns_explicit_label%0D%0A++order+by+id%0D%0A++limit+101 |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1316137982 | https://github.com/simonw/datasette/pull/1893#issuecomment-1316137982 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5Ocqv- | simonw 9599 | 2022-11-16T01:23:47Z | 2022-11-16T01:23:47Z | OWNER | Autocomplete here looks promising (I've wanted that to work for years!), but it does currently show a whole bunch of suggestions which aren't part of the SQLite SQL dialect: |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 | |
1316135244 | https://github.com/simonw/datasette/pull/1893#issuecomment-1316135244 | https://api.github.com/repos/simonw/datasette/issues/1893 | IC_kwDOBm6k_c5OcqFM | simonw 9599 | 2022-11-16T01:21:41Z | 2022-11-16T01:21:41Z | OWNER | I just deployed a demo instance like this (using the commit hash from this PR):
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Upgrade to CodeMirror 6, add SQL autocomplete 1450363982 |
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 8