{"html_url": "https://github.com/simonw/datasette/issues/1190#issuecomment-1699925224", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1190", "id": 1699925224, "node_id": "IC_kwDOBm6k_c5lUszo", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-08-30T22:16:38Z", "updated_at": "2023-08-30T22:16:38Z", "author_association": "OWNER", "body": "This is going to happen in this tool instead:\r\n- https://github.com/simonw/dclient", "reactions": "{\"total_count\": 1, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 1, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 787098146, "label": "`datasette publish upload` mechanism for uploading databases to an existing Datasette instance"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/532#issuecomment-1539009453", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/532", "id": 1539009453, "node_id": "IC_kwDOCGYnMM5bu2ut", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-05-08T20:30:29Z", "updated_at": "2023-05-08T20:30:42Z", "author_association": "OWNER", "body": "Here's an improvement:\r\n```\r\n% sqlite-utils insert /tmp/b.db blah /tmp/blah.txt\r\n [####################################] 100%\r\nError: Invalid JSON - use --csv for CSV or --tsv for TSV files\r\n\r\nJSON error: Expecting value: line 1 column 1 (char 0)\r\n```", "reactions": "{\"total_count\": 1, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 1, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1620254998, "label": "Show more information when JSON can't be imported with sqlite-utils insert"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1817#issuecomment-1258756231", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1817", "id": 1258756231, "node_id": "IC_kwDOBm6k_c5LBxiH", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-09-26T23:19:34Z", "updated_at": "2022-09-26T23:19:34Z", "author_association": "OWNER", "body": "This is a good idea - it's something I should do before Datasette 1.0.\r\n\r\nI was a tiny bit worried about compatibility (Datasette is 3.7+) but it looks like they have been in Python since 3.0!", "reactions": "{\"total_count\": 1, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 1, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1384273985, "label": "Expose `sql` and `params` arguments to various plugin hooks"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/pull/480#issuecomment-1232089808", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/480", "id": 1232089808, "node_id": "IC_kwDOCGYnMM5JcDLQ", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-08-30T19:43:02Z", "updated_at": "2022-08-30T19:43:02Z", "author_association": "OWNER", "body": "Yeah this seems like a reasonable addition to me. \r\n\r\nNeeds a test, which can go next to this one: https://github.com/simonw/sqlite-utils/blob/087753cd42c406f1e060c1822dcd9b5fda3d60f4/tests/test_fts.py#L561", "reactions": "{\"total_count\": 1, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 1, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1355433619, "label": "search_sql add include_rank option"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/467#issuecomment-1224386951", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/467", "id": 1224386951, "node_id": "IC_kwDOCGYnMM5I-qmH", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-08-23T17:20:07Z", "updated_at": "2022-08-23T17:20:07Z", "author_association": "OWNER", "body": "Example of that prototype working:\r\n```pycon\r\n>>> from sqlite_utils import Database\r\n>>> db = Database(memory=True)\r\n>>> db[\"dogs\"].create({\"id\": int, \"name\": str}, pk=\"id\")\r\n\r\n>>> db[\"dogs\"].create({\"id\": int, \"name\": str, \"age\": int}, pk=\"id\", transform=True)\r\n
\r\n```", "reactions": "{\"total_count\": 1, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 1, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1348169997, "label": "Mechanism for ensuring a table has all the columns"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/420#issuecomment-1080141111", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/420", "id": 1080141111, "node_id": "IC_kwDOCGYnMM5AYaU3", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-03-28T03:25:57Z", "updated_at": "2022-03-28T03:54:37Z", "author_association": "OWNER", "body": "So now this should solve your problem:\r\n```\r\necho '[{\"name\": \"notaword\"}, {\"name\": \"word\"}]\r\n' | python3 -m sqlite_utils insert listings.db listings - --convert '\r\nimport enchant\r\nd = enchant.Dict(\"en_US\")\r\n\r\ndef convert(row):\r\n global d\r\n row[\"is_dictionary_word\"] = d.check(row[\"name\"])\r\n'\r\n```", "reactions": "{\"total_count\": 1, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 1, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1178546862, "label": "Document how to use a `--convert` function that runs initialization code first"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/415#issuecomment-1073468996", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/415", "id": 1073468996, "node_id": "IC_kwDOCGYnMM4_-9ZE", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-03-21T04:14:42Z", "updated_at": "2022-03-21T04:14:42Z", "author_association": "OWNER", "body": "I can fix this like so:\r\n```\r\n% sqlite-utils convert demo.db demo foo '{\"foo\": \"bar\"}' --multi --dry-run\r\nabc\r\n --- becomes:\r\n{\"foo\": \"bar\"}\r\n\r\nWould affect 1 row\r\n```\r\nDiff is this:\r\n```diff\r\ndiff --git a/sqlite_utils/cli.py b/sqlite_utils/cli.py\r\nindex 0cf0468..b2a0440 100644\r\n--- a/sqlite_utils/cli.py\r\n+++ b/sqlite_utils/cli.py\r\n@@ -2676,7 +2676,10 @@ def convert(\r\n raise click.ClickException(str(e))\r\n if dry_run:\r\n # Pull first 20 values for first column and preview them\r\n- db.conn.create_function(\"preview_transform\", 1, lambda v: fn(v) if v else v)\r\n+ preview = lambda v: fn(v) if v else v\r\n+ if multi:\r\n+ preview = lambda v: json.dumps(fn(v), default=repr) if v else v\r\n+ db.conn.create_function(\"preview_transform\", 1, preview)\r\n sql = \"\"\"\r\n select\r\n [{column}] as value,\r\n```", "reactions": "{\"total_count\": 1, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 1, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1171599874, "label": "Convert with `--multi` and `--dry-run` flag does not work"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/413#issuecomment-1065245831", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/413", "id": 1065245831, "node_id": "IC_kwDOCGYnMM4_flyH", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-03-11T15:59:14Z", "updated_at": "2022-03-11T15:59:14Z", "author_association": "OWNER", "body": "Hint from https://twitter.com/AdamChainz/status/1502311047612575745\r\n\r\n> Try:\r\n> \r\n> `autodoc_typehints = 'description'`\r\n> \r\n> For a list-of-arguments format\r\n> \r\n> https://sphinx-doc.org/en/master/usage/extensions/autodoc.html#confval-autodoc_typehints", "reactions": "{\"total_count\": 1, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 1, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1166587040, "label": "Display autodoc type information more legibly"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/pull/407#issuecomment-1040959312", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/407", "id": 1040959312, "node_id": "IC_kwDOCGYnMM4-C8dQ", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-02-16T00:58:32Z", "updated_at": "2022-02-16T00:58:32Z", "author_association": "OWNER", "body": "This is honestly one of the most complete PRs I've ever seen for a feature of this size. Thanks so much for this!", "reactions": "{\"total_count\": 1, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 1, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1138948786, "label": "Add SpatiaLite helpers to CLI"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/93#issuecomment-974765825", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/93", "id": 974765825, "node_id": "IC_kwDOBm6k_c46Gb8B", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-21T07:00:21Z", "updated_at": "2021-11-21T07:00:21Z", "author_association": "OWNER", "body": "Closing this in favour of Datasette Desktop: https://datasette.io/desktop", "reactions": "{\"total_count\": 1, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 1, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 273944952, "label": "Package as standalone binary"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/335#issuecomment-968380387", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/335", "id": 968380387, "node_id": "IC_kwDOCGYnMM45uE_j", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-14T22:55:56Z", "updated_at": "2021-11-14T22:55:56Z", "author_association": "OWNER", "body": "OK, this should fix it.", "reactions": "{\"total_count\": 1, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 1, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1042569687, "label": "sqlite-utils index-foreign-keys fails due to pre-existing index"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1458#issuecomment-943620649", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1458", "id": 943620649, "node_id": "IC_kwDOBm6k_c44PoIp", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-10-14T18:38:58Z", "updated_at": "2021-10-14T18:38:58Z", "author_association": "OWNER", "body": "This is a great idea, thanks.", "reactions": "{\"total_count\": 1, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 1, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 988555009, "label": "Rework the `--static` documentation a bit"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/309#issuecomment-895587441", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/309", "id": 895587441, "node_id": "IC_kwDOCGYnMM41YZRx", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-08-09T22:15:45Z", "updated_at": "2021-08-09T22:15:45Z", "author_association": "OWNER", "body": "```\r\nOverflowError: Python int too large to convert to SQLite INTEGER\r\n>>> import sys\r\n>>> def find_variables(tb, vars):\r\n to_find = list(vars)\r\n found = {}\r\n for var in to_find:\r\n if var in tb.tb_frame.f_locals:\r\n vars.remove(var)\r\n found[var] = tb.tb_frame.f_locals[var]\r\n if vars and tb.tb_next:\r\n found.update(find_variables(tb.tb_next, vars))\r\n return found\r\n... \r\n>>> find_variables(sys.last_traceback, [\"sql\", \"params\"])\r\n{'params': [34223049823094832094802398430298048240], 'sql': 'INSERT INTO [row] ([v]) VALUES (?);'}\r\n```", "reactions": "{\"total_count\": 1, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 1, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 963897111, "label": "sqlite-utils insert errors should show SQL and parameters, if possible"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1127#issuecomment-852712106", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1127", "id": 852712106, "node_id": "MDEyOklzc3VlQ29tbWVudDg1MjcxMjEwNg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-06-02T04:28:55Z", "updated_at": "2021-06-02T04:28:55Z", "author_association": "OWNER", "body": "This became resizable in #1236.", "reactions": "{\"total_count\": 1, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 1, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 756818250, "label": "Make the custom SQL query text box larger or resizable"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/619#issuecomment-850057694", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/619", "id": 850057694, "node_id": "MDEyOklzc3VlQ29tbWVudDg1MDA1NzY5NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-05-28T02:03:05Z", "updated_at": "2021-05-28T02:03:05Z", "author_association": "OWNER", "body": "I nearly got this working, but I ran into one last problem: the code path for when an error is raised but the user specified `?_shape=array`. I'll open a draft PR with where I've got to so far.", "reactions": "{\"total_count\": 1, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 1, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 520655983, "label": "\"Invalid SQL\" page should let you edit the SQL"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1320#issuecomment-847237524", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1320", "id": 847237524, "node_id": "MDEyOklzc3VlQ29tbWVudDg0NzIzNzUyNA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-05-24T18:15:56Z", "updated_at": "2021-05-24T18:15:56Z", "author_association": "OWNER", "body": "Added some new documentation about that here: https://github.com/simonw/datasette/blob/c0a748e5c3f498fa8c139b420d07dd3dea612379/docs/installation.rst#installing-plugins", "reactions": "{\"total_count\": 1, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 1, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 884952179, "label": "Can't use apt-get in Dockerfile when using datasetteproj/datasette as base"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/227#issuecomment-778854808", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/227", "id": 778854808, "node_id": "MDEyOklzc3VlQ29tbWVudDc3ODg1NDgwOA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-02-14T22:46:54Z", "updated_at": "2021-02-14T22:46:54Z", "author_association": "OWNER", "body": "Fix is released in 3.5.", "reactions": "{\"total_count\": 1, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 1, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 807174161, "label": "Error reading csv files with large column data"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1091#issuecomment-756453945", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1091", "id": 756453945, "node_id": "MDEyOklzc3VlQ29tbWVudDc1NjQ1Mzk0NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-01-07T23:42:50Z", "updated_at": "2021-01-07T23:42:50Z", "author_association": "OWNER", "body": "@henry501 it looks like you spotted a bug in the documentation - I just addressed that, the fix is now live here: https://docs.datasette.io/en/latest/deploying.html#running-datasette-behind-a-proxy", "reactions": "{\"total_count\": 1, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 1, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 742011049, "label": ".json and .csv exports fail to apply base_url"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/983#issuecomment-753219407", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/983", "id": 753219407, "node_id": "MDEyOklzc3VlQ29tbWVudDc1MzIxOTQwNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-12-31T22:38:45Z", "updated_at": "2020-12-31T22:39:10Z", "author_association": "OWNER", "body": "You'll be able to add JavaScript plugins using a bunch of different mechanisms:\r\n\r\n- In a custom template, dropping the code in to a `