Skip to content

refactor: simplify EventRepository query/purge complexity#625

Open
Ferryx349 wants to merge 2 commits into
cameri:mainfrom
Ferryx349:m2
Open

refactor: simplify EventRepository query/purge complexity#625
Ferryx349 wants to merge 2 commits into
cameri:mainfrom
Ferryx349:m2

Conversation

@Ferryx349
Copy link
Copy Markdown
Collaborator

Description

This PR simplifies EventRepository by breaking down high-complexity logic in filter construction and retention purge flow.
It refactors applyFilterConditions into smaller helpers for hex and generic tag criteria handling, while preserving SQL behavior.
It also refactors deleteExpiredAndRetained into clearer steps (candidate selection, whitelist handling, purge count mapping).

Related Issue

Fixes- #46

Types of changes

  • Non-functional change (docs, style, minor refactor)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my code changes.
  • I added a changeset, or this is docs-only and I added an empty changeset.
  • All new and existing tests passed.

Signed-off-by: ABHAY PANDEY <pandeyabhay967@gmail.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 24, 2026

🦋 Changeset detected

Latest commit: ac60d31

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
nostream Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coveralls
Copy link
Copy Markdown
Collaborator

Coverage Status

coverage: 65.901% (+0.8%) from 65.108% — Ferryx349:m2 into cameri:main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants