Gabrielus
Gabrielus
DTDrizzle Team
Created by Gabrielus on 5/31/2024 in #help
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
1 replies