Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reconsider row value truncation on query page #1957

Open
simonw opened this issue Dec 14, 2022 · 1 comment
Open

Reconsider row value truncation on query page #1957

simonw opened this issue Dec 14, 2022 · 1 comment

Comments

@simonw
Copy link
Owner

simonw commented Dec 14, 2022

Consider this example: https://ripgrep.datasette.io/repos?sql=select+json_group_array%28full_name%29+from+repos

select json_group_array(full_name) from repos

CleanShot 2022-12-14 at 15 48 32@2x

My intention here was to get a string of JSON I can copy and paste elsewhere - see: https://til.simonwillison.net/sqlite/compare-before-after-json

The truncation isn't helping here.

@simonw
Copy link
Owner Author

simonw commented Dec 14, 2022

One option: if any rows were truncated, show a button you can click to run the query again with truncation disabled - maybe with ?_truncate=off in the URL or similar.

But... still want to truncate if the user runs a query that would return multiple MBs of HTML (assuming the other Datasette query limits don't stop that from happening).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant