You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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...
The text was updated successfully, but these errors were encountered:
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 theexecute()
andselect()
functions is that the first does not do any kind of query result serialisation, whileselect()
does. You can in fact execute any kind of query through the two functions, and theselect()
function is not limited toSELECT
queries ; queriesRETURNING
data can be run successfully throughselect()
.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...
The text was updated successfully, but these errors were encountered: