cpl_query.extension
cpl_query.extension.iterable_abc
- class cpl_query.extension.iterable_abc.IterableABC(t: Optional[type] = None, values: Optional[list] = None)
Bases:
abc.ABC
,list
- abstract all(func: Callable) bool
- abstract any(func: Callable) bool
- append(_IterableABC__object: object) None
Append object to the end of the list.
- abstract average(func: Optional[Callable] = None) Union[int, float, complex]
- abstract contains(value: object) bool
- abstract count(func: Callable) int
Return number of occurrences of value.
- abstract distinct(func: Callable) cpl_query.extension.iterable_abc.IterableABC
- abstract element_at(index: int) cpl_query.extension.iterable_abc.IterableABC.any
- abstract element_at_or_default(index: int) Optional[cpl_query.extension.iterable_abc.IterableABC.any]
- extend(_IterableABC__iterable: Iterable) None
Extend list by appending elements from the iterable.
- abstract first() cpl_query.extension.iterable_abc.IterableABC.any
- abstract first_or_default() cpl_query.extension.iterable_abc.IterableABC.any
- abstract for_each(func: Callable) Union[int, float, complex]
- abstract last() cpl_query.extension.iterable_abc.IterableABC.any
- abstract last_or_default() cpl_query.extension.iterable_abc.IterableABC.any
- abstract max(func: Optional[Callable] = None) Union[int, float, complex]
- abstract min(func: Optional[Callable] = None) Union[int, float, complex]
- abstract order_by(func: Callable) cpl_query.extension.iterable_abc.IterableABC
- abstract order_by_descending(func: Callable) cpl_query.extension.iterable_abc.IterableABC
- abstract reverse() cpl_query.extension.iterable_abc.IterableABC
Reverse IN PLACE.
- abstract single() cpl_query.extension.iterable_abc.IterableABC.any
- abstract single_or_default() Optional[cpl_query.extension.iterable_abc.IterableABC.any]
- abstract skip(index: int) cpl_query.extension.iterable_abc.IterableABC
- abstract skip_last(index: int) cpl_query.extension.iterable_abc.IterableABC
- abstract sum(func: Optional[Callable] = None) Union[int, float, complex]
- abstract take(index: int) cpl_query.extension.iterable_abc.IterableABC
- abstract take_last(index: int) cpl_query.extension.iterable_abc.IterableABC
- to_list() list
- abstract where(func: Callable) cpl_query.extension.iterable_abc.IterableABC
cpl_query.extension.list
- class cpl_query.extension.list.List(t: Optional[type] = None, values: Optional[list] = None)
Bases:
cpl_query.extension.iterable.Iterable
Implementation of :class: cpl_query.extension.iterable.Iterable
cpl_query.extension.ordered_iterable_abc
- class cpl_query.extension.ordered_iterable_abc.OrderedIterableABC(_func: Optional[collections.abc.Callable] = None)
Bases:
cpl_query.extension.iterable_abc.IterableABC
- abstract then_by(func: collections.abc.Callable) cpl_query.extension.ordered_iterable_abc.OrderedIterableABC
Sorts OrderedList in ascending order by function
func:
Callable
list of
cpl_query.extension.OrderedIterableABC
- abstract then_by_descending(func: collections.abc.Callable) cpl_query.extension.ordered_iterable_abc.OrderedIterableABC
Sorts OrderedList in descending order by function
func:
Callable
list of
cpl_query.extension.OrderedIterableABC