Skip to content
Snippets Groups Projects

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

Approval is optional

Merged by avatar (Sep 23, 2025 4:50am UTC)

Merge details

  • Changes merged into main with 4fdfda29.
  • Deleted the source branch.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Created by: codecov[bot]

    Codecov Report

    Merging #15665 (4fdfda2) into main (0356174) will increase coverage by 0.00%. The diff coverage is 80.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%) :arrow_up:
    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%) :arrow_up:
    cmd/repo-updater/repos/types.go 74.20% <0.00%> (-0.25%) :arrow_down:
Please register or sign in to reply
Loading