SQLite INSERT ... RETURNING clauses are now supported by /db/-/execute-write, plus several fixes relating to the base_url setting.
INSERT/UPDATE/DELETEstatements that use SQLite'sRETURNINGclause now work correctly in the new/db/-/execute-writeinterface. Datasette fetches returned rows before committing the write transaction, displays them in the HTML UI and includes them in the"rows"key for the JSON API response. (#2762, #2763)Database.execute_write()now returns anExecuteWriteResultobject instead of the rawsqlite3.Cursorreturned byconn.execute(). The new object exposes.rowcount,.lastrowid,.description,.truncatedand.fetchall(), and addsreturn_all=andreturning_limit=options for controlling how rows fromRETURNINGstatements are buffered. (#2763)- Fixed the
/-/jumpnavigation search endpoint when Datasette is served with a configuredbase_url. (#2757) - Fixed JSON and CSV export links, plus
Link:alternate headers, on table, row and query pages whenbase_urlis configured. These could previously be prefixed twice. (#2759) - Fixed several other
base_urlhandling bugs, including the API explorer form actions and share links, the/-/patternsdevelopment page, permanent redirects such as/-to/-/and database query redirects from/<database>?sql=...to/<database>/-/query?sql=....