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