Skip to content

Conversation

@otherview
Copy link
Member

Description

Interfaces the logdb package that was implemented by sqlite3 into logsdb and implementation into sqlite3.

Fixes # (issue)

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • New and existing E2E tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have not added any vulnerable dependencies to my code

@otherview otherview requested a review from a team as a code owner November 24, 2025 12:15
}

func (db *LogDB) FilterEvents(ctx context.Context, filter *EventFilter) ([]*Event, error) {
func (db *LogDB) FilterEvents(ctx context.Context, filter *logsdb.EventFilter) ([]*logsdb.Event, error) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

generally its bad practice for a child package to depend on its parent

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be ok for defining models and interfaces, it's a used pattern, but I agree it's code smell for implementations.

I can likely move the sql-ish implementations of the models into an interface as well and let sqllite implement.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved the sql deps to sqlite3 now following the same pattern as api.

@codecov-commenter
Copy link

codecov-commenter commented Nov 24, 2025

@otherview otherview force-pushed the pedro/interface_logsdb branch from 743f3ca to a14e5ec Compare November 26, 2025 16:59
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.

5 participants