feature #4: create procedure for user
This commit is contained in:
12
resources/functions/user/find_user_by_id.sql
Normal file
12
resources/functions/user/find_user_by_id.sql
Normal 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);
|
||||
Reference in New Issue
Block a user