Open sachaarbonel opened 6 years ago
The results.List
must be just one. You are writing functions that are called from sql.
What do you expect to get when calling select E()
?
Well a possible solution could be :
SELECT (E(inputed_floats)).outCA, (E(inputed_floats)).outB, (E(inputed_floats)).outC FROM some_table;
With my E func being slightly changed for the example :
func E(inA float64, inB float64, inC float64,) (outA []float64, outB []float64, outC []float64) {
return []float64{inA}, []float64{inB}, []float64{inC}
}
I expect the result to be like that :
outA | outB | outC
-----------+-------------+-----------
{inAvalue} | {inBvalue} | {inCvalue}
(1 row)
I guess we'll have to parse the returned values variable names for the composite types. Let me know what do you think of my proposal.
https://github.com/microo8/plgo/blob/a744149107575082de08228b103e8bc95129ca43/plgo/functions.go#L129
Hi @microo8 sorry to bothering you again could you add support for multiple return types. I thought I could make a PR but my go skills still need some work lol. BUT I've made my homework here is the AST on my package :