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
Replace BindParameter ? with $1 does not work in INSERT VALUES ? #3564
Comments
yea okay this further makes me believe the driver should be more replacing these instead of the codegen |
This makes only sense if sqldelight provides the range of |
yea I'm imagining something where we go from
to
my biggest concern right now is if this effects the performance dramatically |
Or |
I have started implementing this proposal on a branch in my fork. The changes are mostly untested, the tests have not been adjusted and there is most likely potential for optimisation in the generated code. It does already handle array arguments and index changes due to runtime replacements (when Before continuing I would like your opinion, If you want to I can open a pull request and we can discuss the changes there. |
I am fine with the changes in the driver api. Before continuing please also wait for feedback from @AlecStrong |
@AlecStrong did you have time to take a (short) look over these changes? If so i would very much like to know if the direction of these changes are ok for you or if you want some assurance (benchmarks?) before considering these changes. |
@sachera I would suggest creating the PR and we can discuss it there. |
Done: #3662 |
SQLDelight Version
2.0.0-alpha04
Operating System
macOS
Gradle Version
7.5.1
Kotlin Version
1.7.20
Dialect
Postgresql
AGP Version
No response
Describe the Bug
While #3375 adds support to replace
?
to$1
in code generating, #3375 (comment), this does not work when sqldelight replaces a single?
with multiple?
in an insert statement:Results into:
INSERT INTO foo VALUES (?, ?, ?)
, but should be:INSERT INTO foo VALUES ($1, $2, $3)
too.Stacktrace
No response
Gradle Build Script
No response
The text was updated successfully, but these errors were encountered: