feat(server): add /search/statistics resource (#18885)

This commit is contained in:
Jonathan Gilbert 2025-06-07 11:12:53 +10:00 committed by GitHub
parent ecb16d9907
commit fb4be6e231
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 954 additions and 16 deletions

View file

@ -20,6 +20,20 @@ limit
offset
$7
-- SearchRepository.searchStatistics
select
count(*) as "total"
from
"assets"
inner join "exif" on "assets"."id" = "exif"."assetId"
where
"assets"."visibility" = $1
and "assets"."fileCreatedAt" >= $2
and "exif"."lensModel" = $3
and "assets"."ownerId" = any ($4::uuid[])
and "assets"."isFavorite" = $5
and "assets"."deletedAt" is null
-- SearchRepository.searchRandom
(
select