Open nick-keller opened 9 months ago
If you want to have a param that is an array that you can pass to a function, you cannot. For instance:
SELECT FROM my_function(ARRAY['a', 'b', 'c']);
I added a param transform to allow for array literal spread as shown below.
/* @name selectFunctionResult @param values -> ARRAY[...] */ SELECT FROM my_function(:values);
const parameters = { values: ['a', 'b', 'c'] }; selectSomeUsers.run(parameters, connection);
-- Parameters: ['a', 'b', 'c'] SELECT FROM my_function(ARRAY[$1, $2, $3]);
Unfortunately I am having quite a hard time running everything locally, so maybe @adelsz you should double check on your machine that it works as expected.
Thx!
Hey @adelsz ! Could you please help me figure this out please. I just cannot get it to work on my machine 🙏
The problem
If you want to have a param that is an array that you can pass to a function, you cannot. For instance:
The solution
I added a param transform to allow for array literal spread as shown below.
Unfortunately I am having quite a hard time running everything locally, so maybe @adelsz you should double check on your machine that it works as expected.
Thx!