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:
parent
434773025b
commit
a8958c76fb
2 changed files with 18 additions and 10 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue