Wykres commitów

35 Commity (main)

Autor SHA1 Wiadomość Data
Simon Willison b36a2d8f4b Require update-row to use insert replace, closes #2279 2024-02-19 12:55:51 -08:00
Simon Willison 3856a8cb24 Consistent Permission denied:, refs #2279 2024-02-19 12:51:14 -08:00
Simon Willison 3a999a85fb Fire insert-rows on /db/-/create if rows were inserted, refs #2260 2024-02-16 13:59:56 -08:00
Simon Willison 244f3ff83a Test demonstrating fix for permisisons bug in #2262 2024-02-16 13:39:57 -08:00
Simon Willison c62cfa6de8 Fix upsert test to detect new alter-table event 2024-02-08 13:36:17 -08:00
Simon Willison c954795f9a alter: true for row/-/update, refs #2101 2024-02-08 13:36:17 -08:00
Simon Willison 4e944c29e4 Corrected path used in test_update_row_check_permission 2024-02-08 13:36:17 -08:00
Simon Willison 528d89d1a3 alter: true support for /-/insert and /-/upsert, refs #2101 2024-02-08 13:36:17 -08:00
Simon Willison b5ccc4d608 Test for Permission denied - need alter-table 2024-02-08 13:36:17 -08:00
Simon Willison 900d15bcb8 alter table support for /db/-/create API, refs #2101 2024-02-08 13:36:17 -08:00
Simon Willison bcc4f6bf1f
track_event() mechanism for analytics and plugins
* Closes #2240
* Documentation for event plugin hooks, refs #2240
* Include example track_event plugin in docs, refs #2240
* Tests for track_event() and register_events() hooks, refs #2240
* Initial documentation for core events, refs #2240
* Internals documentation for datasette.track_event()
2024-01-31 15:21:40 -08:00
Simon Willison 5c64af6936 Upgrade to latest Black, closes #2239 2024-01-30 19:55:26 -08:00
Simon Willison c094dde3ff Extra permission rules for /-/create, closes #1937 2022-12-14 12:21:18 -08:00
Simon Willison 34cffff02a Refactor _headers() for write API tests 2022-12-07 17:39:07 -08:00
Simon Willison dee18ed8ce test_create_table_error_rows_twice_with_duplicates, refs #1927 2022-12-07 17:29:24 -08:00
Simon Willison 9342b60f14 test_create_table_error_if_pk_changed, refs #1927 2022-12-07 17:27:01 -08:00
Simon Willison 6b27537988 ignore/replace to create requires pk, refs #1927 2022-12-07 17:18:40 -08:00
Simon Willison 272982e8a6
/db/table/-/upsert API
Close #1878

Also made a few tweaks to how _r works in tokens and actors,
refs #1855 - I needed that mechanism for the tests.
2022-12-07 17:12:15 -08:00
Simon Willison 93ababe6f7 Initial attempt at insert/replace for /-/create, refs #1927 2022-12-02 23:00:18 -08:00
Simon Willison 7fde34cfcb Documentation and test for UNIQUE constraint failed, refs #1924 2022-11-30 18:05:29 -08:00
Simon Willison 8404b21556 405 method not allowed for GET to POST endpoints, closes #1916 2022-11-29 21:15:13 -08:00
Simon Willison 6bda225786 Tests for rowid and compound pk row deletion, closes #1864 2022-11-29 10:53:55 -08:00
Simon Willison 1154048f79 Compound primary key support for /db/-/create - closes #1911
Needed for tests in #1864
2022-11-29 10:47:48 -08:00
Simon Willison 484bef0d3b /db/table/pk/-/update endpoint, closes #1863 2022-11-29 10:06:19 -08:00
Simon Willison 187d91d686 /db/-/create API endpoint, closes #1882 2022-11-14 21:57:28 -08:00
Simon Willison 264d0ab471 Renamed return_rows to return in insert API
Refs https://github.com/simonw/datasette/issues/1866#issuecomment-1313128913
2022-11-13 21:49:23 -08:00
Simon Willison 65521f03db Error for drop against immutable database, closes #1874 2022-11-13 21:40:10 -08:00
Simon Willison 612da8eae6 confirm: true mechanism for drop table API, closes #1887 2022-11-13 21:17:18 -08:00
Simon Willison 497290beaf Handle database errors in /-/insert, refs #1866, #1873
Also improved API explorer to show HTTP status of response, refs #1871
2022-11-01 12:59:17 -07:00
Simon Willison 9bec7c38eb ignore and replace options for bulk inserts, refs #1873
Also removed the rule that you cannot include primary keys in the rows you insert.

And added validation that catches invalid parameters in the incoming JSON.

And renamed "inserted" to "rows" in the returned JSON for return_rows: true
2022-11-01 11:08:17 -07:00
Simon Willison 00632ded30 Initial attempt at /db/table/row/-/delete, refs #1864 2022-10-30 16:16:00 -07:00
Simon Willison 2865d3956f /db/table/-/drop API, closes #1874 2022-10-30 15:17:21 -07:00
Simon Willison c35859ae3d API for bulk inserts, closes #1866 2022-10-29 23:03:45 -07:00
Simon Willison 6e788b49ed New URL design /db/table/-/insert, refs #1851 2022-10-27 13:18:05 -07:00
Simon Willison a2a5dff709 Missing tests for insert row API, refs #1851 2022-10-27 12:08:26 -07:00