feat: Limit repository get_all to maximum entries

Can simply pass an int and will limit the sql to that amount.
This commit is contained in:
Marty Oehme 2025-07-22 05:30:26 +02:00
parent 434773025b
commit a8958c76fb
Signed by: Marty
GPG key ID: 4E535BC19C61886E
2 changed files with 18 additions and 10 deletions

View file

@ -17,7 +17,7 @@ class IImprovementRepo(Protocol):
def get(self, id: str) -> Improvement:
raise NotImplementedError
def get_all(self) -> list[Improvement]:
def get_all(self, last_n: int | None = None) -> list[Improvement]:
raise NotImplementedError
def remove(self, id: str) -> Improvement: