Skip to content

breaking: introduce SqlSafeStr API #3364

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

breaking: introduce SqlSafeStr API #3364

wants to merge 1 commit into from

Conversation

abonander
Copy link
Collaborator

@abonander abonander commented Jul 22, 2024

This will allow owned Strings (among other types) to be passed to query() and friends without lifetime issues.

The existing requirement of a borrowed string is meant to discourage adding dynamic data to a query with format!(), but that's very non-obvious and also precludes many useful patterns.

closes #1594

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proposal: Improvements to sqlx::query() for Query Builders, and Explicit Injection Safety
1 participant