mirror of
https://github.com/penpot/penpot.git
synced 2025-05-10 13:26:37 +02:00
🐛 Retrieve complete information for files in dashboard search
This commit is contained in:
parent
07fb644e07
commit
ce37b46de0
1 changed files with 8 additions and 1 deletions
|
@ -55,10 +55,17 @@
|
||||||
ppr.is_owner = true or
|
ppr.is_owner = true or
|
||||||
ppr.can_edit = true)
|
ppr.can_edit = true)
|
||||||
)
|
)
|
||||||
select file.*
|
select distinct
|
||||||
|
file.*,
|
||||||
|
array_agg(page.id) over pages_w as pages,
|
||||||
|
first_value(page.data) over pages_w as data
|
||||||
from file
|
from file
|
||||||
inner join projects as pr on (file.project_id = pr.id)
|
inner join projects as pr on (file.project_id = pr.id)
|
||||||
|
left join page on (file.id = page.file_id)
|
||||||
where file.name ilike ('%' || $3 || '%')
|
where file.name ilike ('%' || $3 || '%')
|
||||||
|
window pages_w as (partition by file.id order by page.created_at
|
||||||
|
range between unbounded preceding
|
||||||
|
and unbounded following)
|
||||||
order by file.created_at asc")
|
order by file.created_at asc")
|
||||||
|
|
||||||
(s/def ::search-files
|
(s/def ::search-files
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue