Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
fmv1992 opened this issue Mar 20, 2022 · 2 comments
Open

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

fmv1992 opened this issue Mar 20, 2022 · 2 comments

Comments

@fmv1992
Copy link

fmv1992 commented Mar 20, 2022

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].

@mmzeeman
Copy link
Owner

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

@mmzeeman
Copy link
Owner

mmzeeman commented May 10, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants