#57 I can filter articles by workgroup

update lib "postgres-json:1.2.1"
This commit is contained in:
2020-08-24 15:58:48 +02:00
parent 01c3d85a17
commit 16feab9655
19 changed files with 125 additions and 32 deletions

View File

@@ -15,6 +15,7 @@ begin
from article a
where (_search is null or _search = '' or a ==> dsl.multi_match('{title^3, content, description, tags}', _search))
and (_filter->>'created_by_id' is null or a.created_by_id = (_filter->>'created_by_id')::uuid)
and (_filter->>'workgroup_id' is null or a.workgroup_id = (_filter->>'workgroup_id')::uuid)
and a.last_version = true
)
into resource, total
@@ -33,6 +34,7 @@ begin
or a ==> dsl.multi_match('{title^3, content, description, tags}', _search)
)
and (_filter->>'created_by_id' is null or a.created_by_id = (_filter->>'created_by_id')::uuid)
and (_filter->>'workgroup_id' is null or a.workgroup_id = (_filter->>'workgroup_id')::uuid)
and a.last_version = true
order by