Files
dc-project/resources/functions/user/find_user_by_id.sql

12 lines
281 B
PL/PgSQL

create or replace procedure find_user_by_id(in id uuid, inout resource json) language plpgsql as
$$
declare
_id alias for id;
begin
select to_json(u) into resource
from "user" as u
where u.id = _id;
end;
$$;
-- drop procedure if exists find_user_by_id(inout json);