fixs and move files
This commit is contained in:
20
src/main/resources/sql/functions/comment/edit_comment.sql
Normal file
20
src/main/resources/sql/functions/comment/edit_comment.sql
Normal file
@@ -0,0 +1,20 @@
|
||||
create or replace function edit_comment(reference regclass, id uuid, content text) returns void
|
||||
language plpgsql as
|
||||
$$
|
||||
declare
|
||||
_id alias for id;
|
||||
_content alias for content;
|
||||
begin
|
||||
if reference = 'article'::regclass then
|
||||
update comment_on_article c set
|
||||
content = _content
|
||||
where c.id = _id;
|
||||
elseif reference = 'constitution'::regclass then
|
||||
update comment_on_constitution c set
|
||||
content = _content
|
||||
where c.id = _id;
|
||||
end if;
|
||||
end;
|
||||
$$;
|
||||
|
||||
-- drop function if exists edit_comment(regclass, uuid, uuid, text, uuid);
|
||||
Reference in New Issue
Block a user