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

[docs] [sql] Make the distinction clearer between select and execute functions #3139

Open
ElDonad opened this issue Jan 28, 2025 · 0 comments

Comments

@ElDonad
Copy link

ElDonad commented Jan 28, 2025

I ran into this issue recently, that I wanted to run an INSERT query finishing with a "RETURNING" statement from JavaScript (supported in SQLite since 2021 I believe), but using the execute() function did not return any data from the query. After looking around in the code, I think I understand that the difference between the execute() and select() functions is that the first does not do any kind of query result serialisation, while select() does. You can in fact execute any kind of query through the two functions, and the select() function is not limited to SELECT queries ; queries RETURNING data can be run successfully through select().

I think this should be made clearer in the docs, the two function names are not the most explicit, but I don't think this warrants a function rename. Probably a few words about this in the API docs would be enough to prevent such confusion.

I'm down to do it if needed, but I wanted to submit the idea around first as I'm very new to Tauri...

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

1 participant