Joining dynamic SQL strings #189
-
|
Hi, I'm trying to achieve something like the following, in order to filter a query dynamically: .where {
[an array of values]
.map { #sql(…) }
.joined(operator: .or)
}The problem is I'm either not using the correct type to infer a I tried using Any help/guidance would be much appreciated! 🤗 |
Beta Was this translation helpful? Give feedback.
Answered by
stephencelis
Sep 26, 2025
Replies: 1 comment 1 reply
-
|
You can drop down to the query fragment level: .where {
#sql(
[an array of values]
.map(\.queryFragment)
.joined(separator: " OR ")
)
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Pomanks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can drop down to the query fragment level: