Added distinct query

This commit is contained in:
2021-07-27 11:20:35 +02:00
parent c60598b3f6
commit 669133d491
4 changed files with 40 additions and 3 deletions

View File

@@ -23,6 +23,9 @@ class IterableABC(ABC, list):
@abstractmethod
def count(self, func: Callable) -> int: pass
@abstractmethod
def distinct(self, func: Callable) -> 'IterableABC': pass
@abstractmethod
def first(self) -> any: pass
@@ -33,13 +36,13 @@ class IterableABC(ABC, list):
def for_each(self, func: Callable): pass
@abstractmethod
def order_by(self, func: Callable): pass
def order_by(self, func: Callable) -> 'IterableABC': pass
@abstractmethod
def order_by_descending(self, func: Callable): pass
def order_by_descending(self, func: Callable) -> 'IterableABC': pass
@abstractmethod
def single(self): pass
def single(self) -> any: pass
@abstractmethod
def single_or_default(self) -> Optional[any]: pass