mirror of
https://github.com/immich-app/immich.git
synced 2025-07-03 21:40:00 +02:00
refactor: count all return type (#17529)
This commit is contained in:
parent
abde0fbe60
commit
0b22d3348e
9 changed files with 52 additions and 55 deletions
server/src/queries
|
@ -277,15 +277,15 @@ select
|
|||
count(*) filter (
|
||||
where
|
||||
(
|
||||
"assets"."type" = $1
|
||||
and "assets"."isVisible" = $2
|
||||
"assets"."type" = 'IMAGE'
|
||||
and "assets"."isVisible" = true
|
||||
)
|
||||
) as "photos",
|
||||
count(*) filter (
|
||||
where
|
||||
(
|
||||
"assets"."type" = $3
|
||||
and "assets"."isVisible" = $4
|
||||
"assets"."type" = 'VIDEO'
|
||||
and "assets"."isVisible" = true
|
||||
)
|
||||
) as "videos",
|
||||
coalesce(
|
||||
|
@ -300,7 +300,7 @@ select
|
|||
where
|
||||
(
|
||||
"assets"."libraryId" is null
|
||||
and "assets"."type" = $5
|
||||
and "assets"."type" = 'IMAGE'
|
||||
)
|
||||
),
|
||||
0
|
||||
|
@ -310,7 +310,7 @@ select
|
|||
where
|
||||
(
|
||||
"assets"."libraryId" is null
|
||||
and "assets"."type" = $6
|
||||
and "assets"."type" = 'VIDEO'
|
||||
)
|
||||
),
|
||||
0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue