refactor: get map markers database query (#15899)

This commit is contained in:
Jason Rasmussen 2025-02-04 16:07:41 +01:00 committed by GitHub
parent 99de52479e
commit 58bf58b393
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 41 additions and 24 deletions

View file

@ -0,0 +1,24 @@
-- NOTE: This file is auto generated by ./sql-generator
-- MapRepository.getMapMarkers
select
"id",
"exif"."latitude" as "lat",
"exif"."longitude" as "lon",
"exif"."city",
"exif"."state",
"exif"."country"
from
"assets"
inner join "exif" on "assets"."id" = "exif"."assetId"
and "exif"."latitude" is not null
and "exif"."longitude" is not null
left join "albums_assets_assets" on "assets"."id" = "albums_assets_assets"."assetsId"
where
"isVisible" = $1
and "deletedAt" is null
and "exif"."latitude" is not null
and "exif"."longitude" is not null
and "ownerId" in ($2)
order by
"fileCreatedAt" desc