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

Deprecated fetch_many method since it was deprecated in sqlx 0.7.4. #17

Merged
merged 1 commit into from
Mar 27, 2024
Merged

Deprecated fetch_many method since it was deprecated in sqlx 0.7.4. #17

merged 1 commit into from
Mar 27, 2024

Conversation

m-nawa
Copy link
Contributor

@m-nawa m-nawa commented Mar 22, 2024

Hello.

I use this crate because it is very useful for using sqlx. Now that I have updated sqlx to 0.7.4, I get a warning on conditional_query_as!().

warning: use of deprecated method `sqlx::query::Map::<'q, DB, F, A>::fetch_many`: Only the SQLite driver supports multiple statements in one prepared statement and that behavior is deprecated. Use `sqlx::raw_sql()` instead.

It seems that Map::fetch_many() was deprecated in sqlx 0.7.4.

I am not using this method but I get a warning. Therefore, I would like to modify it so that the warning is only issued when the method is used.

Please let me know if there is something I should do.

Thanks.

@kyrias
Copy link
Owner

kyrias commented Mar 25, 2024

Hmm, we could do this and cut a release, though I think that we should probably just do a major bump and drop support for it entirely.

If you feel like it you could add something like the following to the Unreleased section of CHANGELOG.md. Otherwise I'll do it myself right before cutting the release.

### Deprecated

- Deprecated `fetch_many` method since it was deprecated in `sqlx` 0.7.4. ([#17](https://github.com/kyrias/sqlx-conditional-queries/pull/17))

@m-nawa
Copy link
Contributor Author

m-nawa commented Mar 25, 2024

Thank you for your reply!

I have added about this PR in the Unreleased section of CHANGELOG.md.

I don't use fetch_many() in my product, so I'm not too sure if it should be removed or kept.
However, I think the users will be happy with the current form where they can be told what to do by deprecated warnings.

How about doing this fix in patch bump and removing fetch_many in major bump?

@m-nawa m-nawa changed the title suppress warning that Map::fetch_many() is deprecated @ sqlx 0.7.4 Deprecated fetch_many method since it was deprecated in sqlx 0.7.4. Mar 25, 2024
@kyrias kyrias merged commit 989950e into kyrias:main Mar 27, 2024
4 checks passed
@kyrias
Copy link
Owner

kyrias commented Mar 27, 2024

Thank you!

@m-nawa m-nawa deleted the supress-deperecated-warning-when-not-use-fetch_many branch March 27, 2024 13:17
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