-
Notifications
You must be signed in to change notification settings - Fork 879
Support dynamic where clauses #2060
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
I have implemented this in #2343 |
Thank you @jwc-clinnection once the release is available I'll check it out |
It is failing some tests. For example this is an expected change given the pull request:
I tried:
But, I still get errors when I run:
Should I be doing something to regenerate the test samples? If so, may I have some guidance on the procedure? |
@go-aegian Can you give any direction? Thank you. |
@jwc-clinnection unfortunately I can't help you on this as I am not familiar how is it compiled, tested. That is why I wait for a released version. |
@kyleconroy The tests that this is failing are expected given the changes. Can you give me advice as to how to proceed to correct the tests? |
Any movement on this? I would really like to be able to leverage this in our codebases that use sqlc. |
@jwc-clinnection have you got any advice from @kyleconroy on how to move this forward to the release? In the meantime I did manage a workaround process until your work is released though. |
@kyleconroy, any news here? I'm open to help in any way I can. Dynamic filters are a really useful feature that would allow us to use |
would you care to elaborate on this workaround ? |
Uh oh!
There was an error while loading. Please reload this page.
apart from the predefined where clause, it needs somehow to be able to support passing a string containing a filter clause that it's parameters are already resolved prior to the Query function, I proposed a possible solution to be able to declare in the sql definition something like this
Generated
const listOrders = "select * from order where status = $1 and (@filter::text);"
What database engines need to be changed?
PostgreSQL, MySQL
What programming language backends need to be changed?
Go, Python, Kotlin
The text was updated successfully, but these errors were encountered: