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

Pass the persistent query setting when preparing queries with the Any driver #3297

Merged

Conversation

etorreborre
Copy link
Contributor

This PR passes the query.persistent() value to the fetch_many and fetch_optional function so that they can use it to cache prepared queries.

Note I have kept the existing logic for the SQLite driver where persisting queries requires both the persistent flag and the existence of arguments.

@etorreborre etorreborre force-pushed the etorreborre/persistent-queries-any branch from ac1d8a1 to 24db70e Compare June 18, 2024 09:37
@etorreborre etorreborre marked this pull request as ready for review June 18, 2024 09:37
@abonander
Copy link
Collaborator

Note I have kept the existing logic for the SQLite driver where persisting queries requires both the persistent flag and the existence of arguments.

Why? This is just a pessimization for queries that don't use arguments.

@etorreborre
Copy link
Contributor Author

Why? This is just a pessimization for queries that don't use arguments.

Just to be consistent with the existing code because I wasn't sure about the current differences. I'll change that.

@etorreborre etorreborre force-pushed the etorreborre/persistent-queries-any branch from 24db70e to b96d735 Compare June 21, 2024 10:57
@etorreborre
Copy link
Contributor Author

@abonander please check the latest commit.

@etorreborre etorreborre force-pushed the etorreborre/persistent-queries-any branch from b96d735 to 447ac4a Compare July 12, 2024 07:41
@etorreborre
Copy link
Contributor Author

@abonander I have now rebased on main and the build is 🟢 .

@abonander abonander merged commit b71221c into launchbadge:main Jul 15, 2024
65 checks passed
jrasanen pushed a commit to jrasanen/sqlx that referenced this pull request Oct 14, 2024
jrasanen pushed a commit to jrasanen/sqlx that referenced this pull request Oct 14, 2024
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