Coalesce macro #3884
SleeplessOne1917
started this conversation in
Ideas
Coalesce macro
#3884
Replies: 1 comment
-
You already can support different kinds of parameters by using generics in combination with I don't think that macros will solve the variadic case as you somehow need to produce a specific struct in the end. The usual rust "solution" for this kind of problem is to accept a tuple as argument. I think I would be open to extend the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, the most straightforward way to use the coalesce function is to create an ad hoc function with the arguments you need using the
sql_function
macro. This can be cumbersome if you need to coalesce expressions with varying numbers or parameters.Coalesce could likely be variadic if made as a macro. I will attempt to implement this and share my results.
Beta Was this translation helpful? Give feedback.
All reactions