2025-02-04 16:07:41 +01:00
|
|
|
-- 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
|
|
|
|
|
where
|
|
|
|
|
"isVisible" = $1
|
|
|
|
|
and "deletedAt" is null
|
2025-02-21 15:32:08 +03:00
|
|
|
and (
|
|
|
|
|
"ownerId" in ($2)
|
|
|
|
|
or exists (
|
|
|
|
|
select
|
|
|
|
|
from
|
|
|
|
|
"albums_assets_assets"
|
|
|
|
|
where
|
|
|
|
|
"assets"."id" = "albums_assets_assets"."assetsId"
|
|
|
|
|
and "albums_assets_assets"."albumsId" in ($3)
|
|
|
|
|
)
|
|
|
|
|
)
|
2025-02-04 16:07:41 +01:00
|
|
|
order by
|
|
|
|
|
"fileCreatedAt" desc
|