Add opinion on find_article_by_id & find_articles request

create request for find_citizen_opinions_by_target_id
create fixture for opinions
This commit is contained in:
2020-02-07 18:56:01 +01:00
parent 2048c71881
commit f622dbeecd
14 changed files with 282 additions and 5 deletions

View File

@@ -23,6 +23,7 @@ begin
a.*,
find_citizen_by_id(a.created_by_id) as created_by,
count_vote(a.id) as votes,
count_opinion(a.id) as opinions,
zdb.score(a.ctid) _score
from article as a
where (
@@ -60,3 +61,4 @@ end;
$$;
-- drop function if exists find_articles(text, json, text, text, int, int);
-- select find_article_by_id('d91aa0cd-61d6-83cc-41bb-8d5656e130f7');