Add sqlc.slice() to support IN clauses in MySQL (#695)#1816
Add sqlc.slice() to support IN clauses in MySQL (#695)#1816kyleconroy merged 1 commit intosqlc-dev:mainfrom
Conversation
5515aa5 to
8ca1ff1
Compare
|
I'm not sure why the tests fail. It complains about codegen.json mismatching and says there's thousands of {mis,}matching lines, but the file is only ~500 lines. I suspect something regenerates it, but I failed to find the culprit. |
|
Does this have a path towards supporting multiple IN args? |
|
what's the status of this PR? What's missing? |
|
I'm waiting for @kyleconroy to review. I'm hoping he can give me a pointer for the failing test.
That should be doable to add on top of this PR. |
I'm looking at your code and thinking would it be better to do what sqlx did for for queries with |
|
@Rhymond apologies for the late reply Your proposal consists of two parts: a) Keep using a) I don't mind much which way to go. I'd propose to first get this in, and we can easily refactor later. |
|
@kyleconroy this is ready to be merged I've rebased and the test failures magically went away. Maybe I was based on a bad commit before ¯\(ツ)/¯ |
|
I've tested this branch out in a new project and found it works as expected so far. Would love to see this merged! Thank you @Jille for the work! |
|
Hi @kyleconroy we're sponsoring this project and would really love to see this feature. It's also been requested a lot (#695) by other people. Is there anything missing that prevents this from getting merged? Happy to help as well. Thanks for your work! |
TODO: 요청당 쿼리 계속 날라감 sqlc sqlc-dev/sqlc#1816 머지되면 리팩토링
|
appreciated if this feature get supported as soon as possible |
|
this feature will be merged on the next release? |
|
How can we move this forward? What's missing? I'm keen to help |
|
I'm looking forward this feature! |
This feature (currently MySQL-specific) allows passing in a slice to an
IN clause. Adding the new function sqlc.slice() as opposed to overloading
the parsing of "IN (?)" was chosen to guarantee backwards compatibility.
SELECT * FROM tab WHERE col IN (sqlc.slice("go_param_name"))
This commit is based on sqlc-dev#1312 by
Paul Cameron. I just rebased and did some cleanup.
Co-authored-by: Paul Cameron <cameronpm@gmail.com>
|
I've rebased to main. |
|
would it be possible to create a new release already so this important feature included? |
…dev#1816) This feature (currently MySQL-specific) allows passing in a slice to an IN clause. Adding the new function sqlc.slice() as opposed to overloading the parsing of "IN (?)" was chosen to guarantee backwards compatibility. SELECT * FROM tab WHERE col IN (sqlc.slice("go_param_name")) This commit is based on sqlc-dev#1312 by Paul Cameron. I just rebased and did some cleanup. Co-authored-by: Paul Cameron <cameronpm@gmail.com>
This feature allows passing in a slice to an IN clause. Adding the new function sqlc.slice() as opposed to overloading the parsing of "IN (?)" was chosen to guarantee backwards compatibility.
SELECT * FROM tab WHERE col IN (sqlc.slice("go_param_name"))
This commit is based on #1312 by
Paul Cameron. I just rebased and did some cleanup.
Co-authored-by: Paul Cameron cameronpm@gmail.com