duckweb_end
scalar · LOAD duckweb
duckweb_end() -> VARCHARTerminates a streamed body.
SELECT duckweb_end() FROM duckweb_match(route, '/') WHERE method = 'GET'The zero-length chunk that ends a chunked response. Its absence is exactly how a client detects a truncated response, so every response opened with duckweb_head has to end with precisely one of these — no more, or the extra rows land after the body is closed.
Note the gate. duckweb_end() takes no arguments and so has nothing to make it per-route; without FROM duckweb_match(...) it would terminate every response the macro produces, including the ones belonging to other routes.
Responses that are complete on their own — duckweb_redirect, duckweb_asset, duckweb_client_shell — are not streamed and must not be followed by one.