Skip to content

Conversation

simonpasquier
Copy link
Contributor

The db struct doesn't need to embed the Database interface. Instead we can verify that it satisfies the interface which would detect when the definition of the interface changes (new method for instance).

@Nexucis
Copy link
Member

Nexucis commented Oct 14, 2025

Yeah I know there is this way to check statically an interface is properly implemented, but the other way works as well most of the time.
And we did that everytime, so ideally we should change it everywhere :/

The `db` struct doesn't need to embed the `Database` interface. Instead
we can verify that it satisfies the interface which would detect when
the definition of the interface changes (new method for instance).

The change has also been applied to the other structs following the same
pattern.

Signed-off-by: Simon Pasquier <[email protected]>
@simonpasquier simonpasquier force-pushed the remove-database-interface branch from 3910483 to 1efb5cd Compare October 15, 2025 08:36
Copy link
Member

@Nexucis Nexucis left a comment

Choose a reason for hiding this comment

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

awesome, thank you @simonpasquier

@Nexucis Nexucis merged commit bcc0795 into perses:main Oct 15, 2025
7 checks passed
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