-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
Prepared statements and async execution #110
Comments
reactive queries already use prepared statements internally. |
I wonder is it possible to use prepared statements in such fashion: const statement = db.prepareStatement('SELECT * FROM User WHERE name = ?;');
// ...
const getData = statement.executeAsync(..);
const cancelUpdate = statement.reactiveExecute({ ... }); For example if pagination is used I call |
you don't need to do anything, reactiveExecute already uses a prepared statement internally. |
@ospfranco Understood that reactiveExecute uses prepared statements internally. For those not using reactive queries, is the addition of Would like to be able to do:
Thanks for your consideration! |
Prepared statements are already implemented. Read the docs. |
@ospfranco I understand that prepared statements are implemented, but it's my understanding that executeAsync is not implemented for prepared statements. Am I misunderstanding something? |
Ah, sorry. I misunderstood. Yeah, in the current stable version there is only the sync api. You can try the next beta version where there is only async execute. |
Oh sweet—thanks! And thanks for the really quick response. Will try out the beta. Prepared statements really sped up my use-case (loading a ton of data), but blocked renders, so I swapped back. This is going to be huge. |
Hi. Thank you for library. I wonder is it possible to implement
execute[Raw]Async
andreactiveExecute
for prepared statements and will it have any performance improvements?The text was updated successfully, but these errors were encountered: