duckweb_form
scalar · LOAD duckweb
duckweb_form(VARCHAR, VARCHAR) -> VARCHARReads one field from an application/x-www-form-urlencoded request body.
SELECT duckweb_redirect(303, '/notes', '')
FROM duckweb_match(route, '/notes')
WHERE method = 'POST' AND duckweb_form(body, 'body') <> ''body is the fourth argument render receives. Parsing is identical to duckweb_query — same escapes, same + for space, same first-occurrence rule, same empty string for a field that is not there — because a query string and a form body are the same encoding.
The body is read up to 1 MiB; a larger one is refused before render is called.
A render macro cannot write: INSERT inside CREATE MACRO ... AS TABLE is a parser error. A route that has to store what it read supplies a real table function from its own extension and points duckweb_render_function at it.