event_logs: Reduce query expression duplication
Created by: efritz
Some of these expressions are hard to remember, so I'm going to define them in one place.
- our DATE_TRUNC usage works as expected for days and months, but for weeks we need to do some clock arithmetic so that it starts on sunday, not monday
- user id expressions are also a bit tricky and are repeated more than necessary
Merge request reports
Activity
Created by: codecov[bot]
Codecov Report
Merging #15665 (4fdfda2) into main (0356174) will increase coverage by
0.00%
. The diff coverage is80.00%
.@@ Coverage Diff @@ ## main #15665 +/- ## ======================================= Coverage 52.40% 52.40% ======================================= Files 1628 1628 Lines 81236 81239 +3 Branches 7136 7136 ======================================= + Hits 42570 42572 +2 - Misses 34880 34881 +1 Partials 3786 3786
Flag Coverage Δ *Carryforward flag go 52.36% <80.00%> (+<0.01%)
integration 28.35% <ø> (ø)
Carriedforward from 0356174 storybook 27.19% <ø> (ø)
Carriedforward from 0356174 typescript 52.49% <ø> (ø)
Carriedforward from 0356174 unit 34.78% <ø> (ø)
Carriedforward from 0356174 *This pull request uses carry forward flags. Click here to find out more.
Impacted Files Coverage Δ internal/db/event_logs.go 53.11% <80.00%> (+0.59%)
cmd/repo-updater/repos/types.go 74.20% <0.00%> (-0.25%)
Please register or sign in to reply