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

fix: execute statement reliable #291

Merged
merged 6 commits into from
Apr 3, 2025
Merged

fix: execute statement reliable #291

merged 6 commits into from
Apr 3, 2025

Conversation

juleswritescode
Copy link
Collaborator

@juleswritescode juleswritescode commented Apr 1, 2025

I've been through many iterations but this seems to be the simplest.

We use a dedicated connection for the prepare statement and close it on drop. This will clear all the prepared statements for that session. sqlx itself doesn't cache anything when using prepare. If we worry about performance overhead, I suggest we a) use sqlx cache via prepare_with and b) debounce the publishing of diagnostics again 👍

Copy link
Collaborator

@psteinroe psteinroe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

after the ordering was removed this makes me very happy! there is one unused import but other than that great job!

@psteinroe psteinroe merged commit c87d6a4 into main Apr 3, 2025
7 checks passed
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

Successfully merging this pull request may close these issues.

2 participants