Is there way to ergonomically get a tuple from a checked query? #3744
Unanswered
Victor-N-Suadicani
asked this question in
Q&A
Replies: 1 comment
-
|
If you need a structure you can pass around, it'd make for more readable code if you just defined a struct and used |
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
Uh oh!
There was an error while loading. Please reload this page.
-
I find myself writing something like this often:
Is there a way to avoid that
.mapcall and get a tuple directly? I know I can do it with thequery_asfunction, but then I don't get the query checked at compile time and I must specify the types myself.query_scalardoesn't work as it only works for single columns. It feels like there might be a missingquery_tup!macro which could do this? Or is there some limitation explaining why this is not implemented? I.e. I'd like this interface:Beta Was this translation helpful? Give feedback.
All reactions