feature #4: create procedure for user

This commit is contained in:
2019-07-26 02:47:43 +02:00
parent 578587f430
commit 0a92316128
8 changed files with 100 additions and 4 deletions

View File

@@ -0,0 +1,12 @@
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);