Allow streaming rows from `/v1/transactions` requests
jeromegn opened this issue · 0 comments
jeromegn commented
In SQLite, it's possible to return data as part of an INSERT or UPDATE. It could also make sense to use a transaction for reading data only (if you want to do multiple SELECT, for example).
Right now, the /v1/transactions
API handler does not stream back results and in fact only accepts statements that won't return data.
It would be desirable to mimic using a plain SQLite database as much as possible via the HTTP API.
There are some challenges:
- Should it be possible to stream rows back for multi-statement transactions? Perhaps we only stream the last one or only allow 1 statement.
- Come up with a new type of NDJSON-serialize line for "rows affected"
- Make it backwards compatible (should be doable via Accept header?)