Replies: 1 comment 6 replies
-
Hi @Virgiel, thanks for your contribution 😄 🚀. I like the implementation (struct-per-query), and also the fact that it'd simplify the codegen, but I'm not sure if it's worth it. My reasoning is that for most intents and purposes, your SQL already determines the number of rows to be returned. If I have to specify a quantifier, I'd rather do it once in an annotation near the query, rather than at each call site. Ultimately my concern is to keep the boilerplate at a minimum. Personally I never felt the need to be generic over the number of returned rows, but if this is a problem for you (or anyone else), I'd like to know. I'll keep the discussion open because I'd like to see if other users have opinions on this. |
Beta Was this translation helpful? Give feedback.
-
Currently, every query has to declare a quantifier but we could do without it. The idea is for queries to return a query struct that defer execution.
This code:
Generate this function:
With this client code:
Used like that:
Advantages
Drawbacks
Conclusion
I am not convinced that this is better, which is why I opened a discussion and not an issue. Do you find this solution better? Do you have any ideas to improve it?
Beta Was this translation helpful? Give feedback.
All reactions