Skip to content

refactor(core): Remove lifetime parameter from Arguments trait #3960

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 9 commits into
base: main
Choose a base branch
from

Conversation

iamjpotts
Copy link
Contributor

@iamjpotts iamjpotts commented Aug 2, 2025

Prep work for supporting named parameters, which will require boxing and reusing the encodable bound arguments.

Builds on #3958.

Relevant commit: 90f2291

Does your PR solve an issue?

No, but it standardizes that all argument buffers own their data, which means that we also standardize how references can be used when passing bind parameters to query! macros. Previously there were more alternative ways to pass references with the Postgres driver; this ensures the flexibility of the Postgres driver is also supported with other drivers (by preventing the introduction of a lifetime constraint to their argument buffers).

Is this a breaking change?

Yes - removes lifetime argument on two traits that are a part of the public api (Arguments and ArgumentBuffer) and makes cascading changes to query related traits and the Encode trait.

@iamjpotts iamjpotts changed the title Jp/arguments trait lifetime refactor(core): Remove lifetime parameter from Arguments trait Aug 2, 2025
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.

1 participant