Calling a stored procedure with an array parameter

I'm trying to call a stored procedure from drizzle which is roughly defined as:
CREATE FUNCTION demo( param1 uuid[], param2 uuid ) RETURNS void LANGUAGE plpgsql SECURITY DEFINER AS $function$ BEGIN ... END $function$;
The closest I have gotten to, so far, to calling it successfully, is:
sql SELECT demo( ${sql.raw(ARRAY[${AllIds.map(id => '${id}'::uuid).join(', ')}]::uuid[])}, ${secondParam}::uuid );
Is there any way I can remove the raw somehow? If I do, the parameter doesn't seem to be getting passed along correctly to postgres
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server