Add SQL mode and make it use the query! macro for type checking
Rust / build (push) Successful in 55s

This commit is contained in:
2024-04-26 21:44:04 +01:00
parent ef15a630d6
commit e73123b7f9
7 changed files with 61 additions and 7 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
with timelineItems as (select jsonb_array_elements(raw_files.json -> 'timelineItems') as timelineItem
from raw_files),
from raw_files
where date = ANY ($1)),
places as (select distinct on (md5(timelineItem ->> 'place' :: text)) timelineItem -> 'place' as place,
timelineItem -> 'place' ->> 'placeId' as placeId,
(timelineItem -> 'place' ->> 'lastSaved') :: timestamptz as lastSaved
+2 -1
View File
@@ -1,5 +1,6 @@
with timelineItems as (select jsonb_array_elements(raw_files.json -> 'timelineItems') as timelineItem
from raw_files),
from raw_files
where date = ANY ($1)),
max_last_saved as (select timelineItem ->> 'itemId' as itemId,
max((timelineItem ->> 'lastSaved') :: timestamptz) as latest_last_saved
from timelineItems