Simon Willison
866852eff6
Clarifying comments
2026-05-26 12:46:18 -07:00
Simon Willison
1ac4265ffd
Require permissions for untrusted stored query execution, refs #2735
2026-05-26 12:12:59 -07:00
Simon Willison
1cd162e9da
Removed some no-longer-necessary code, simplified
...
view-query is back in the default allow actions now. We have
other mechanisms that work for controlling visibility, and
the fact that queries default to running with the permissions
of the actor makes this safe.
2026-05-26 12:07:30 -07:00
Simon Willison
4a1a4d7807
Query is_trusted and is_private properties
...
Refs https://github.com/simonw/datasette/issues/2735#issuecomment-4547270516
Diff explanation: https://gist.github.com/simonw/1e4de6c4b041a51968eb273ee96dec1f
2026-05-26 11:59:49 -07:00
Simon Willison
f1dd86ebfb
Tweak URL designs of new endpoints
2026-05-25 14:05:26 -07:00
Simon Willison
8ab8999ba9
Big visual improvement to /-/queries pages
...
Including /db/-/queries
Refs https://github.com/simonw/datasette/issues/2735#issuecomment-4536860239
2026-05-25 12:56:59 -07:00
Simon Willison
4208ded249
No execute-write on immutable databases
...
Refs https://github.com/simonw/datasette/issues/2742#issuecomment-4536690161
2026-05-25 12:46:21 -07:00
Simon Willison
1f7c26ffea
Refactor to share JS/HTML between execute and execute-write
...
Refs #2742
2026-05-25 12:45:42 -07:00
Simon Willison
e1261442c0
Update parameters/query operations as user edits the write query
...
Refs #2742
2026-05-25 12:09:52 -07:00
Simon Willison
abb17ba773
Improved the look of the parameters table
...
Refs #2742
It now adapts better to different sizes of column labels.
2026-05-25 11:42:26 -07:00
Simon Willison
66bbbbc947
Support multi-line parameters on /db/-/execute-write
...
Refs https://github.com/simonw/datasette/issues/2742#issuecomment-4536317049
Each paramater input now has an expand/collapse button toggle to turn into a textarea.
If you paste text that includes at least one newline it toggles automatically.
2026-05-25 11:35:09 -07:00
Simon Willison
1bce34a338
If just a single insert, link to row page
...
Refs #2742
2026-05-25 11:22:24 -07:00
Simon Willison
2b5b4ed66b
Much improved "Write to this database" UI
...
- Start with a template option, letting you pick table and operation
- SQL textarea defaults to 4 empty lines at start
- Query operations table is simpler and looks nicer
Refs #2742
2026-05-25 11:11:11 -07:00
Simon Willison
f0b59971f7
Delete unnecessary test
2026-05-25 10:40:00 -07:00
Simon Willison
6eee6c81e8
Add global query browser
...
Refs #2735
2026-05-25 10:24:42 -07:00
Simon Willison
310c36ae94
Limit database query preview to five
...
Refs #2735
2026-05-25 10:18:36 -07:00
Simon Willison
4a70b89355
Add cursor-paginated query browser
...
Refs #2735
2026-05-25 10:11:46 -07:00
Simon Willison
539ff9ddfc
Drop query publication check from docs
...
Refs #2735
2026-05-25 09:49:21 -07:00
Simon Willison
2d07c3b99e
Ran cog
2026-05-25 09:47:12 -07:00
Simon Willison
e62a5ea337
Rename query publication flag
...
Refs #2735
2026-05-25 09:46:39 -07:00
Simon Willison
e0d39ba69f
Store query options as JSON
...
Refs #2735
2026-05-25 09:41:32 -07:00
Simon Willison
b7505a9fc2
Add execute write SQL database action
...
Refs #2735
2026-05-25 08:49:18 -07:00
Simon Willison
ef43c10388
Add arbitrary write SQL execution page
...
Refs #2735
2026-05-25 08:30:49 -07:00
Simon Willison
2d77e3334b
Clean up query management test coverage
...
Refs #2735
2026-05-24 23:06:01 -07:00
Simon Willison
3b26b7aff0
Document canned query hook removal
...
Refs #2735
2026-05-24 23:00:00 -07:00
Simon Willison
040e42ddca
Enforce query ownership and remove canned query hook
...
Refs #2735
2026-05-24 22:58:50 -07:00
Simon Willison
4b5fac9cf7
Add query management API and create UI
...
Refs #2735
2026-05-24 22:52:06 -07:00
Simon Willison
221be2632e
Add query management actions and write analysis
...
Refs #2735
2026-05-24 22:41:56 -07:00
Simon Willison
b4c63966f8
Load saved queries into permission resources
...
Refs #2735
2026-05-24 22:40:22 -07:00
Simon Willison
7e1abd0da4
Add internal query storage APIs
...
Refs #2735
2026-05-24 22:37:34 -07:00
Simon Willison
daeeca6c6b
Plan internal query storage and management
...
Refs #2735
2026-05-24 22:35:18 -07:00
Simon Willison
a855a1acec
Database.analyze_sql(sql) method
...
Experimental, we may need this for the upcoming canned query
work so that we can tell if a user should be able to save
a writable canned query by confirming they have the right
permissions to update the affected tables.
Refs #2735
2026-05-24 22:29:49 -07:00
Simon Willison
6cafdcb6fa
Added missing issue reference
2026-05-24 21:18:50 -07:00
Simon Willison
f403ea4e53
No need to alias description as description
2026-05-24 16:47:49 -07:00
Simon Willison
f3a34c5012
Enable root permissions for latest.datasette.io
...
Refs #2740
2026-05-24 15:42:57 -07:00
Simon Willison
6aaed2d9b5
2-space indent for HTML version of special JSON views
...
PR #2739
2026-05-24 15:28:13 -07:00
Simon Willison
857af9293c
Release 1.0a30
...
1.0a30
Refs #1752 , #2723 , #2725 , #2727
2026-05-24 14:17:45 -07:00
pintaste
312740b97c
Keyboard navigation and ARIA attributes for actions menus ( #2727 )
...
- Add aria-haspopup="menu" and aria-expanded to summary element
- Add role="menu" to dropdown ul, role="menuitem" and tabindex="-1" to links
- Sync aria-expanded via toggle event listener
- Focus first menu item when menu opens
- Add ArrowDown/ArrowUp navigation between menu items
- Add Escape key to close menu and return focus to summary
Refs #2738
2026-05-24 14:11:04 -07:00
Simon Willison
d11326b250
Fixes for jump to menu accessibility
...
VoiceOver demo video: https://github.com/simonw/datasette/pull/2737#issuecomment-4527447724
HTML explainer: https://gisthost.github.io/?cbdea138b932cdc9cac6dd1e4681a20b
Closes #2736
2026-05-24 07:55:40 -07:00
wheelman
b013aa1f7f
Add CORS headers to /db?sql= query redirect ( #2730 )
...
Closes #2728
2026-05-23 21:21:13 -07:00
Simon Willison
b9cb8e9a30
Tweaked JumpSQL changelog, refs #2731
2026-05-23 21:14:35 -07:00
Simon Willison
a75c9f2401
jump_items_sql() and makeJumpSections() plugin hooks ( #2732 )
...
* /-/tables is now /-/jump
* `jump_items_sql()` plugin hook for contributing to that menu
* JavaScript `makeJumpSections()` hook for populating blank slate
* Menu now stores up to five recently visited items in localStorage
2026-05-23 21:11:17 -07:00
Simon Willison
c1525cb467
Improved examples in JumpSQL docs
2026-05-23 21:01:18 -07:00
Simon Willison
c980234c41
JumpSQL(database=) parameter
...
Refs https://github.com/simonw/datasette/pull/2732#issuecomment-4527304912
2026-05-23 21:00:04 -07:00
Simon Willison
cef6aa85b6
Remove source and source_key columns from JumpSQL
...
Refs https://github.com/simonw/datasette/pull/2732#issuecomment-4527290391
2026-05-23 20:41:32 -07:00
Simon Willison
c73ed1ee4e
Fixed a test I broke
2026-05-23 20:30:56 -07:00
Simon Willison
21a79b34b8
Improvements to Jump SQL columns
...
- Removed database_name and resource_name
- url can now optionally return JSON to reuse datasette.urls. methods
- description is now used as a truncated text description
2026-05-23 20:28:02 -07:00
Simon Willison
0f7e4410c1
Better test name
2026-05-23 17:07:47 -07:00
Simon Willison
9c1f8621eb
Request is always set for jump_items_sql() hook
2026-05-23 16:59:45 -07:00
Simon Willison
be1b5b2b5c
Move debug links into jump menu
2026-05-23 16:57:09 -07:00