-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add SqlStr #3723
base: main
Are you sure you want to change the base?
Add SqlStr #3723
Conversation
I appreciate the effort on this, but in #3364 kind of got stuck on some design questions. I was thinking that I would:
It's extremely hard to resist scope creep with major refactors like this. At minimum I would still delete the (Also, I don't assume you intended to do this, but you erased my authorship in these commits.) |
This would be great, also dropping transactions would probably be easier.
Ah that's why the
This wasn't my first time trying to make this PR work, in my first attempt I tried working on top of your PR but there were too things changed in the |
Not sure if it's appreciated to take over a PR but I thought I'd try and work #3364 out.
This PR changes the following things:
SqlStr
,AssertSqlStr
types andSqlSafeStr
trait.Statement
since the underlying sql string is now owned.Executor
trait to take aSqlStr
instead of a&'q str
.AnyStatement::try_from_statement
method to take aStatement
so theprepare_with
method onAnyConnectionBackend
doesn't have to clone theSqlStr
.There are still lifetimes that should be changed/relaxed, but this works.