esqlite icon indicating copy to clipboard operation
esqlite copied to clipboard

Is there a way to get results out of a transaction?

Open fmv1992 opened this issue 2 years ago • 2 comments

Is there a way to use transactions and get results out of it?

esqlite3:q(
<<"
BEGIN;
-- SELECT data from blobs where md5sum = ?;
-- INSERT INTO blobs_access_record (md5sum) values (?);
SELECT 1;
SELECT 1;
SELECT 1;
COMMIT;
">>,
[],
Db)

Returns []. I would like to get the [1,1,1].

fmv1992 avatar Mar 20 '22 15:03 fmv1992

I think the only way to do that is using multiple queries.

mmzeeman avatar May 10 '22 20:05 mmzeeman

Ah... after inspecting the sqlite3 c api, I think it should be possible to support this. I will look into this. Only not with prepared statements which can take parameters.

mmzeeman avatar May 10 '22 20:05 mmzeeman