-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: get map markers database query (#15899)
- Loading branch information
Showing
2 changed files
with
41 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters