Added cpl_query to docs

This commit is contained in:
Sven Heidemann 2021-11-02 18:41:30 +01:00
parent 58dccea28b
commit b3f8174663
12 changed files with 1280 additions and 96 deletions

Binary file not shown.

Binary file not shown.

View File

@ -8,6 +8,14 @@ cpl_query.extension.iterable_abc
:members:
:undoc-members:
:show-inheritance:
cpl_query.extension.iterable
----------------------------------------------------
.. automodule:: cpl_query.extension.iterable
:members:
:undoc-members:
:show-inheritance:
cpl_query.extension.list
----------------------------------------------------
@ -21,6 +29,14 @@ cpl_query.extension.ordered_iterable_abc
----------------------------------------------------
.. automodule:: cpl_query.extension.ordered_iterable_abc
:members:
:undoc-members:
:show-inheritance:
cpl_query.extension.ordered_iterable
----------------------------------------------------
.. automodule:: cpl_query.extension.ordered_iterable
:members:
:undoc-members:
:show-inheritance:

View File

@ -44,8 +44,10 @@
<li class="toctree-l1 current"><a class="reference internal" href="cpl_query.html">Query Reference</a><ul class="current">
<li class="toctree-l2 current"><a class="current reference internal" href="#">cpl_query.extension</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#module-cpl_query.extension.iterable_abc">cpl_query.extension.iterable_abc</a></li>
<li class="toctree-l3"><a class="reference internal" href="#module-cpl_query.extension.iterable">cpl_query.extension.iterable</a></li>
<li class="toctree-l3"><a class="reference internal" href="#module-cpl_query.extension.list">cpl_query.extension.list</a></li>
<li class="toctree-l3"><a class="reference internal" href="#module-cpl_query.extension.ordered_iterable_abc">cpl_query.extension.ordered_iterable_abc</a></li>
<li class="toctree-l3"><a class="reference internal" href="#module-cpl_query.extension.ordered_iterable">cpl_query.extension.ordered_iterable</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="cpl_query.exceptions.html">cpl_query.exceptions</a></li>
@ -86,149 +88,409 @@
<dt class="sig sig-object py" id="cpl_query.extension.iterable_abc.IterableABC">
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">cpl_query.extension.iterable_abc.</span></span><span class="sig-name descname"><span class="pre">IterableABC</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">t</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">type</span><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">values</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">list</span><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">abc.ABC</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></p>
<p>ABC to define functions on list</p>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable_abc.IterableABC.all">
<em class="property"><span class="pre">abstract</span> </em><span class="sig-name descname"><span class="pre">all</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">func</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Callable</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">bool</span></span></span><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.all" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dd><p>Checks if every element of list equals result found by function</p>
<blockquote>
<div><dl class="simple">
<dt>func: <code class="xref py py-class docutils literal notranslate"><span class="pre">Callable</span></code></dt><dd><p>selected value</p>
</dd>
</dl>
</div></blockquote>
<blockquote>
<div><p>bool</p>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable_abc.IterableABC.any">
<em class="property"><span class="pre">abstract</span> </em><span class="sig-name descname"><span class="pre">any</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">func</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Callable</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">bool</span></span></span><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.any" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dd><p>Checks if list contains result found by function</p>
<blockquote>
<div><dl class="simple">
<dt>func: <code class="xref py py-class docutils literal notranslate"><span class="pre">Callable</span></code></dt><dd><p>selected value</p>
</dd>
</dl>
</div></blockquote>
<blockquote>
<div><p>bool</p>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable_abc.IterableABC.append">
<span class="sig-name descname"><span class="pre">append</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">_IterableABC__object</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">object</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">None</span></span></span><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.append" title="Permalink to this definition"></a></dt>
<dd><p>Append object to the end of the list.</p>
<dd><p>Adds element to list</p>
<blockquote>
<div><dl class="simple">
<dt>__object: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></dt><dd><p>value</p>
</dd>
</dl>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable_abc.IterableABC.average">
<em class="property"><span class="pre">abstract</span> </em><span class="sig-name descname"><span class="pre">average</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">func</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">Callable</span><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">int</span><span class="p"><span class="pre">,</span> </span><span class="pre">float</span><span class="p"><span class="pre">,</span> </span><span class="pre">complex</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.average" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dd><p>Returns average value of list</p>
<blockquote>
<div><dl class="simple">
<dt>func: <code class="xref py py-class docutils literal notranslate"><span class="pre">Callable</span></code></dt><dd><p>selected value</p>
</dd>
</dl>
</div></blockquote>
<blockquote>
<div><p>Union[int, float, complex]</p>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable_abc.IterableABC.contains">
<em class="property"><span class="pre">abstract</span> </em><span class="sig-name descname"><span class="pre">contains</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">value</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">object</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">bool</span></span></span><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.contains" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dd><p>Checks if list contains value given by function</p>
<blockquote>
<div><dl class="simple">
<dt>value: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></dt><dd><p>value</p>
</dd>
</dl>
</div></blockquote>
<blockquote>
<div><p>bool</p>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable_abc.IterableABC.count">
<em class="property"><span class="pre">abstract</span> </em><span class="sig-name descname"><span class="pre">count</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">func</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Callable</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">int</span></span></span><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.count" title="Permalink to this definition"></a></dt>
<dd><p>Return number of occurrences of value.</p>
<dd><p>Returns length of list or count of found elements</p>
<blockquote>
<div><dl class="simple">
<dt>func: <code class="xref py py-class docutils literal notranslate"><span class="pre">Callable</span></code></dt><dd><p>selected value</p>
</dd>
</dl>
</div></blockquote>
<blockquote>
<div><p>int</p>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable_abc.IterableABC.distinct">
<em class="property"><span class="pre">abstract</span> </em><span class="sig-name descname"><span class="pre">distinct</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">func</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Callable</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="#cpl_query.extension.iterable_abc.IterableABC" title="cpl_query.extension.iterable_abc.IterableABC"><span class="pre">cpl_query.extension.iterable_abc.IterableABC</span></a></span></span><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.distinct" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dd><p>Returns list without redundancies</p>
<blockquote>
<div><dl class="simple">
<dt>func: <code class="xref py py-class docutils literal notranslate"><span class="pre">Callable</span></code></dt><dd><p>selected value</p>
</dd>
</dl>
</div></blockquote>
<blockquote>
<div><dl class="field-list simple">
<dt class="field-odd">class</dt>
<dd class="field-odd"><p><cite>cpl_query.extension.iterable_abc.IterableABC</cite></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable_abc.IterableABC.element_at">
<em class="property"><span class="pre">abstract</span> </em><span class="sig-name descname"><span class="pre">element_at</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">index</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="#cpl_query.extension.iterable_abc.IterableABC.any" title="cpl_query.extension.iterable_abc.IterableABC.any"><span class="pre">cpl_query.extension.iterable_abc.IterableABC.any</span></a></span></span><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.element_at" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dd><p>Returns element at given index</p>
<blockquote>
<div><dl class="simple">
<dt>index: <code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></dt><dd><p>index</p>
</dd>
</dl>
</div></blockquote>
<blockquote>
<div><p>Value at index: any</p>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable_abc.IterableABC.element_at_or_default">
<em class="property"><span class="pre">abstract</span> </em><span class="sig-name descname"><span class="pre">element_at_or_default</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">index</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="#cpl_query.extension.iterable_abc.IterableABC.any" title="cpl_query.extension.iterable_abc.IterableABC.any"><span class="pre">cpl_query.extension.iterable_abc.IterableABC.any</span></a><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.element_at_or_default" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dd><p>Returns element at given index or None</p>
<blockquote>
<div><dl class="simple">
<dt>index: <code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></dt><dd><p>index</p>
</dd>
</dl>
</div></blockquote>
<blockquote>
<div><p>Value at index: Optional[any]</p>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable_abc.IterableABC.extend">
<span class="sig-name descname"><span class="pre">extend</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">_IterableABC__iterable</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Iterable</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">None</span></span></span><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.extend" title="Permalink to this definition"></a></dt>
<dd><p>Extend list by appending elements from the iterable.</p>
<dd><p>Adds elements of given list to list</p>
<blockquote>
<div><dl class="simple">
<dt>__iterable: :class: <cite>cpl_query.extension.iterable.Iterable</cite></dt><dd><p>index</p>
</dd>
</dl>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable_abc.IterableABC.first">
<em class="property"><span class="pre">abstract</span> </em><span class="sig-name descname"><span class="pre">first</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="#cpl_query.extension.iterable_abc.IterableABC.any" title="cpl_query.extension.iterable_abc.IterableABC.any"><span class="pre">cpl_query.extension.iterable_abc.IterableABC.any</span></a></span></span><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.first" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dd><p>Returns first element</p>
<blockquote>
<div><p>First element of list: any</p>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable_abc.IterableABC.first_or_default">
<em class="property"><span class="pre">abstract</span> </em><span class="sig-name descname"><span class="pre">first_or_default</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="#cpl_query.extension.iterable_abc.IterableABC.any" title="cpl_query.extension.iterable_abc.IterableABC.any"><span class="pre">cpl_query.extension.iterable_abc.IterableABC.any</span></a></span></span><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.first_or_default" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dd><p>Returns first element or None</p>
<blockquote>
<div><p>First element of list: Optional[any]</p>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable_abc.IterableABC.for_each">
<em class="property"><span class="pre">abstract</span> </em><span class="sig-name descname"><span class="pre">for_each</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">func</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Callable</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">int</span><span class="p"><span class="pre">,</span> </span><span class="pre">float</span><span class="p"><span class="pre">,</span> </span><span class="pre">complex</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.for_each" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<em class="property"><span class="pre">abstract</span> </em><span class="sig-name descname"><span class="pre">for_each</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">func</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Callable</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.for_each" title="Permalink to this definition"></a></dt>
<dd><p>Runs given function for each element of list</p>
<blockquote>
<div><dl class="simple">
<dt>func: :class: <cite>Callable</cite></dt><dd><p>function to call</p>
</dd>
</dl>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable_abc.IterableABC.last">
<em class="property"><span class="pre">abstract</span> </em><span class="sig-name descname"><span class="pre">last</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="#cpl_query.extension.iterable_abc.IterableABC.any" title="cpl_query.extension.iterable_abc.IterableABC.any"><span class="pre">cpl_query.extension.iterable_abc.IterableABC.any</span></a></span></span><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.last" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dd><p>Returns last element</p>
<blockquote>
<div><p>Last element of list: any</p>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable_abc.IterableABC.last_or_default">
<em class="property"><span class="pre">abstract</span> </em><span class="sig-name descname"><span class="pre">last_or_default</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="#cpl_query.extension.iterable_abc.IterableABC.any" title="cpl_query.extension.iterable_abc.IterableABC.any"><span class="pre">cpl_query.extension.iterable_abc.IterableABC.any</span></a></span></span><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.last_or_default" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dd><p>Returns last element or None</p>
<blockquote>
<div><p>Last element of list: Optional[any]</p>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable_abc.IterableABC.max">
<em class="property"><span class="pre">abstract</span> </em><span class="sig-name descname"><span class="pre">max</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">func</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">Callable</span><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">int</span><span class="p"><span class="pre">,</span> </span><span class="pre">float</span><span class="p"><span class="pre">,</span> </span><span class="pre">complex</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.max" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dd><p>Returns highest value</p>
<blockquote>
<div><dl class="simple">
<dt>func: <code class="xref py py-class docutils literal notranslate"><span class="pre">Callable</span></code></dt><dd><p>selected value</p>
</dd>
</dl>
</div></blockquote>
<blockquote>
<div><p>Union[int, float, complex]</p>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable_abc.IterableABC.min">
<em class="property"><span class="pre">abstract</span> </em><span class="sig-name descname"><span class="pre">min</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">func</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">Callable</span><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">int</span><span class="p"><span class="pre">,</span> </span><span class="pre">float</span><span class="p"><span class="pre">,</span> </span><span class="pre">complex</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.min" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dd><p>Returns highest value</p>
<blockquote>
<div><dl class="simple">
<dt>func: <code class="xref py py-class docutils literal notranslate"><span class="pre">Callable</span></code></dt><dd><p>selected value</p>
</dd>
</dl>
</div></blockquote>
<blockquote>
<div><p>Union[int, float, complex]</p>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable_abc.IterableABC.order_by">
<em class="property"><span class="pre">abstract</span> </em><span class="sig-name descname"><span class="pre">order_by</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">func</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Callable</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="#cpl_query.extension.iterable_abc.IterableABC" title="cpl_query.extension.iterable_abc.IterableABC"><span class="pre">cpl_query.extension.iterable_abc.IterableABC</span></a></span></span><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.order_by" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dd><p>Sorts elements by function in ascending order</p>
<blockquote>
<div><dl class="simple">
<dt>func: <code class="xref py py-class docutils literal notranslate"><span class="pre">Callable</span></code></dt><dd><p>selected value</p>
</dd>
</dl>
</div></blockquote>
<blockquote>
<div><dl class="field-list simple">
<dt class="field-odd">class</dt>
<dd class="field-odd"><p><cite>cpl_query.extension.iterable_abc.IterableABC</cite></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable_abc.IterableABC.order_by_descending">
<em class="property"><span class="pre">abstract</span> </em><span class="sig-name descname"><span class="pre">order_by_descending</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">func</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Callable</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="#cpl_query.extension.iterable_abc.IterableABC" title="cpl_query.extension.iterable_abc.IterableABC"><span class="pre">cpl_query.extension.iterable_abc.IterableABC</span></a></span></span><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.order_by_descending" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dd><p>Sorts elements by function in descending order</p>
<blockquote>
<div><dl class="simple">
<dt>func: <code class="xref py py-class docutils literal notranslate"><span class="pre">Callable</span></code></dt><dd><p>selected value</p>
</dd>
</dl>
</div></blockquote>
<blockquote>
<div><dl class="field-list simple">
<dt class="field-odd">class</dt>
<dd class="field-odd"><p><cite>cpl_query.extension.iterable_abc.IterableABC</cite></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable_abc.IterableABC.reverse">
<em class="property"><span class="pre">abstract</span> </em><span class="sig-name descname"><span class="pre">reverse</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="#cpl_query.extension.iterable_abc.IterableABC" title="cpl_query.extension.iterable_abc.IterableABC"><span class="pre">cpl_query.extension.iterable_abc.IterableABC</span></a></span></span><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.reverse" title="Permalink to this definition"></a></dt>
<dd><p>Reverse <em>IN PLACE</em>.</p>
<dd><p>Reverses list</p>
<blockquote>
<div><dl class="field-list simple">
<dt class="field-odd">class</dt>
<dd class="field-odd"><p><cite>cpl_query.extension.iterable_abc.IterableABC</cite></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable_abc.IterableABC.single">
<em class="property"><span class="pre">abstract</span> </em><span class="sig-name descname"><span class="pre">single</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="#cpl_query.extension.iterable_abc.IterableABC.any" title="cpl_query.extension.iterable_abc.IterableABC.any"><span class="pre">cpl_query.extension.iterable_abc.IterableABC.any</span></a></span></span><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.single" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dd><p>Returns one single element of list</p>
<blockquote>
<div><p>Found value: any</p>
</div></blockquote>
<blockquote>
<div><p>ArgumentNoneException: when argument is None
Exception: when argument is None or found more than one element</p>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable_abc.IterableABC.single_or_default">
<em class="property"><span class="pre">abstract</span> </em><span class="sig-name descname"><span class="pre">single_or_default</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="#cpl_query.extension.iterable_abc.IterableABC.any" title="cpl_query.extension.iterable_abc.IterableABC.any"><span class="pre">cpl_query.extension.iterable_abc.IterableABC.any</span></a><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.single_or_default" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dd><p>Returns one single element of list</p>
<blockquote>
<div><p>Found value: Optional[any]</p>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable_abc.IterableABC.skip">
<em class="property"><span class="pre">abstract</span> </em><span class="sig-name descname"><span class="pre">skip</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">index</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="#cpl_query.extension.iterable_abc.IterableABC" title="cpl_query.extension.iterable_abc.IterableABC"><span class="pre">cpl_query.extension.iterable_abc.IterableABC</span></a></span></span><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.skip" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dd><p>Skips all elements from index</p>
<blockquote>
<div><dl class="simple">
<dt>index: <code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></dt><dd><p>index</p>
</dd>
</dl>
</div></blockquote>
<blockquote>
<div><dl class="field-list simple">
<dt class="field-odd">class</dt>
<dd class="field-odd"><p><cite>cpl_query.extension.iterable_abc.IterableABC</cite></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable_abc.IterableABC.skip_last">
<em class="property"><span class="pre">abstract</span> </em><span class="sig-name descname"><span class="pre">skip_last</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">index</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="#cpl_query.extension.iterable_abc.IterableABC" title="cpl_query.extension.iterable_abc.IterableABC"><span class="pre">cpl_query.extension.iterable_abc.IterableABC</span></a></span></span><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.skip_last" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dd><p>Skips all elements after index</p>
<blockquote>
<div><dl class="simple">
<dt>index: <code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></dt><dd><p>index</p>
</dd>
</dl>
</div></blockquote>
<blockquote>
<div><dl class="field-list simple">
<dt class="field-odd">class</dt>
<dd class="field-odd"><p><cite>cpl_query.extension.iterable_abc.IterableABC</cite></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable_abc.IterableABC.sum">
<em class="property"><span class="pre">abstract</span> </em><span class="sig-name descname"><span class="pre">sum</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">func</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">Callable</span><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">int</span><span class="p"><span class="pre">,</span> </span><span class="pre">float</span><span class="p"><span class="pre">,</span> </span><span class="pre">complex</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.sum" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dd><p>Sum of all values</p>
<blockquote>
<div><dl class="simple">
<dt>func: <code class="xref py py-class docutils literal notranslate"><span class="pre">Callable</span></code></dt><dd><p>selected value</p>
</dd>
</dl>
</div></blockquote>
<blockquote>
<div><p>Union[int, float, complex]</p>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable_abc.IterableABC.take">
<em class="property"><span class="pre">abstract</span> </em><span class="sig-name descname"><span class="pre">take</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">index</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="#cpl_query.extension.iterable_abc.IterableABC" title="cpl_query.extension.iterable_abc.IterableABC"><span class="pre">cpl_query.extension.iterable_abc.IterableABC</span></a></span></span><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.take" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dd><p>Takes all elements from index</p>
<blockquote>
<div><dl class="simple">
<dt>index: <code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></dt><dd><p>index</p>
</dd>
</dl>
</div></blockquote>
<blockquote>
<div><dl class="field-list simple">
<dt class="field-odd">class</dt>
<dd class="field-odd"><p><cite>cpl_query.extension.iterable_abc.IterableABC</cite></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable_abc.IterableABC.take_last">
<em class="property"><span class="pre">abstract</span> </em><span class="sig-name descname"><span class="pre">take_last</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">index</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="#cpl_query.extension.iterable_abc.IterableABC" title="cpl_query.extension.iterable_abc.IterableABC"><span class="pre">cpl_query.extension.iterable_abc.IterableABC</span></a></span></span><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.take_last" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dd><p>Takes all elements after index</p>
<blockquote>
<div><dl class="simple">
<dt>index: <code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></dt><dd><p>index</p>
</dd>
</dl>
</div></blockquote>
<blockquote>
<div><dl class="field-list simple">
<dt class="field-odd">class</dt>
<dd class="field-odd"><p><cite>cpl_query.extension.iterable_abc.IterableABC</cite></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable_abc.IterableABC.to_list">
<span class="sig-name descname"><span class="pre">to_list</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">list</span></span></span><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.to_list" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dd><p>Converts :class: <cite>cpl_query.extension.iterable_abc.IterableABC</cite> to :class: <cite>list</cite></p>
<blockquote>
<div><dl class="field-list simple">
<dt class="field-odd">class</dt>
<dd class="field-odd"><p><cite>list</cite></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>
<dl class="py property">
<dt class="sig sig-object py" id="cpl_query.extension.iterable_abc.IterableABC.type">
@ -238,7 +500,415 @@
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable_abc.IterableABC.where">
<em class="property"><span class="pre">abstract</span> </em><span class="sig-name descname"><span class="pre">where</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">func</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Callable</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="#cpl_query.extension.iterable_abc.IterableABC" title="cpl_query.extension.iterable_abc.IterableABC"><span class="pre">cpl_query.extension.iterable_abc.IterableABC</span></a></span></span><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.where" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dd><p>Select element by function</p>
<blockquote>
<div><dl class="simple">
<dt>func: <code class="xref py py-class docutils literal notranslate"><span class="pre">Callable</span></code></dt><dd><p>selected value</p>
</dd>
</dl>
</div></blockquote>
<blockquote>
<div><dl class="field-list simple">
<dt class="field-odd">class</dt>
<dd class="field-odd"><p><cite>cpl_query.extension.iterable_abc.IterableABC</cite></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-cpl_query.extension.iterable">
<span id="cpl-query-extension-iterable"></span><h2>cpl_query.extension.iterable<a class="headerlink" href="#module-cpl_query.extension.iterable" title="Permalink to this headline"></a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="cpl_query.extension.iterable.Iterable">
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">cpl_query.extension.iterable.</span></span><span class="sig-name descname"><span class="pre">Iterable</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">t</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">type</span><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">values</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">list</span><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl_query.extension.iterable.Iterable" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#cpl_query.extension.iterable_abc.IterableABC" title="cpl_query.extension.iterable_abc.IterableABC"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl_query.extension.iterable_abc.IterableABC</span></code></a></p>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable.Iterable.all">
<span class="sig-name descname"><span class="pre">all</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">func</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Callable</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">bool</span></span></span><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.all" title="Permalink to this definition"></a></dt>
<dd><p>Checks if every element of list equals result found by function</p>
<blockquote>
<div><dl class="simple">
<dt>func: <code class="xref py py-class docutils literal notranslate"><span class="pre">Callable</span></code></dt><dd><p>selected value</p>
</dd>
</dl>
</div></blockquote>
<blockquote>
<div><p>bool</p>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable.Iterable.any">
<span class="sig-name descname"><span class="pre">any</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">func</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Callable</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">bool</span></span></span><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.any" title="Permalink to this definition"></a></dt>
<dd><p>Checks if list contains result found by function</p>
<blockquote>
<div><dl class="simple">
<dt>func: <code class="xref py py-class docutils literal notranslate"><span class="pre">Callable</span></code></dt><dd><p>selected value</p>
</dd>
</dl>
</div></blockquote>
<blockquote>
<div><p>bool</p>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable.Iterable.average">
<span class="sig-name descname"><span class="pre">average</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">func</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">Callable</span><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">int</span><span class="p"><span class="pre">,</span> </span><span class="pre">float</span><span class="p"><span class="pre">,</span> </span><span class="pre">complex</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.average" title="Permalink to this definition"></a></dt>
<dd><p>Returns average value of list</p>
<blockquote>
<div><dl class="simple">
<dt>func: <code class="xref py py-class docutils literal notranslate"><span class="pre">Callable</span></code></dt><dd><p>selected value</p>
</dd>
</dl>
</div></blockquote>
<blockquote>
<div><p>Union[int, float, complex]</p>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable.Iterable.contains">
<span class="sig-name descname"><span class="pre">contains</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">value</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">object</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">bool</span></span></span><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.contains" title="Permalink to this definition"></a></dt>
<dd><p>Checks if list contains value given by function</p>
<blockquote>
<div><dl class="simple">
<dt>value: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></dt><dd><p>value</p>
</dd>
</dl>
</div></blockquote>
<blockquote>
<div><p>bool</p>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable.Iterable.count">
<span class="sig-name descname"><span class="pre">count</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">func</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">Callable</span><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">int</span></span></span><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.count" title="Permalink to this definition"></a></dt>
<dd><p>Returns length of list or count of found elements</p>
<blockquote>
<div><dl class="simple">
<dt>func: <code class="xref py py-class docutils literal notranslate"><span class="pre">Callable</span></code></dt><dd><p>selected value</p>
</dd>
</dl>
</div></blockquote>
<blockquote>
<div><p>int</p>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable.Iterable.distinct">
<span class="sig-name descname"><span class="pre">distinct</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">func</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Callable</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="#cpl_query.extension.iterable_abc.IterableABC" title="cpl_query.extension.iterable_abc.IterableABC"><span class="pre">cpl_query.extension.iterable_abc.IterableABC</span></a></span></span><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.distinct" title="Permalink to this definition"></a></dt>
<dd><p>Returns list without redundancies</p>
<blockquote>
<div><dl class="simple">
<dt>func: <code class="xref py py-class docutils literal notranslate"><span class="pre">Callable</span></code></dt><dd><p>selected value</p>
</dd>
</dl>
</div></blockquote>
<blockquote>
<div><dl class="field-list simple">
<dt class="field-odd">class</dt>
<dd class="field-odd"><p><cite>cpl_query.extension.iterable_abc.IterableABC</cite></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable.Iterable.element_at">
<span class="sig-name descname"><span class="pre">element_at</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">index</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="#cpl_query.extension.iterable.Iterable.any" title="cpl_query.extension.iterable.Iterable.any"><span class="pre">cpl_query.extension.iterable.Iterable.any</span></a></span></span><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.element_at" title="Permalink to this definition"></a></dt>
<dd><p>Returns element at given index</p>
<blockquote>
<div><dl class="simple">
<dt>index: <code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></dt><dd><p>index</p>
</dd>
</dl>
</div></blockquote>
<blockquote>
<div><p>Value at index: any</p>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable.Iterable.element_at_or_default">
<span class="sig-name descname"><span class="pre">element_at_or_default</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">index</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="#cpl_query.extension.iterable.Iterable.any" title="cpl_query.extension.iterable.Iterable.any"><span class="pre">cpl_query.extension.iterable.Iterable.any</span></a><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.element_at_or_default" title="Permalink to this definition"></a></dt>
<dd><p>Returns element at given index or None</p>
<blockquote>
<div><dl class="simple">
<dt>index: <code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></dt><dd><p>index</p>
</dd>
</dl>
</div></blockquote>
<blockquote>
<div><p>Value at index: Optional[any]</p>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable.Iterable.first">
<span class="sig-name descname"><span class="pre">first</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="#cpl_query.extension.iterable.Iterable.any" title="cpl_query.extension.iterable.Iterable.any"><span class="pre">cpl_query.extension.iterable.Iterable.any</span></a></span></span><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.first" title="Permalink to this definition"></a></dt>
<dd><p>Returns first element</p>
<blockquote>
<div><p>First element of list: any</p>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable.Iterable.first_or_default">
<span class="sig-name descname"><span class="pre">first_or_default</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="#cpl_query.extension.iterable.Iterable.any" title="cpl_query.extension.iterable.Iterable.any"><span class="pre">cpl_query.extension.iterable.Iterable.any</span></a><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.first_or_default" title="Permalink to this definition"></a></dt>
<dd><p>Returns first element or None</p>
<blockquote>
<div><p>First element of list: Optional[any]</p>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable.Iterable.for_each">
<span class="sig-name descname"><span class="pre">for_each</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">func</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Callable</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.for_each" title="Permalink to this definition"></a></dt>
<dd><p>Runs given function for each element of list</p>
<blockquote>
<div><dl class="simple">
<dt>func: :class: <cite>Callable</cite></dt><dd><p>function to call</p>
</dd>
</dl>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable.Iterable.last">
<span class="sig-name descname"><span class="pre">last</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="#cpl_query.extension.iterable.Iterable.any" title="cpl_query.extension.iterable.Iterable.any"><span class="pre">cpl_query.extension.iterable.Iterable.any</span></a></span></span><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.last" title="Permalink to this definition"></a></dt>
<dd><p>Returns last element</p>
<blockquote>
<div><p>Last element of list: any</p>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable.Iterable.last_or_default">
<span class="sig-name descname"><span class="pre">last_or_default</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="#cpl_query.extension.iterable.Iterable.any" title="cpl_query.extension.iterable.Iterable.any"><span class="pre">cpl_query.extension.iterable.Iterable.any</span></a><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.last_or_default" title="Permalink to this definition"></a></dt>
<dd><p>Returns last element or None</p>
<blockquote>
<div><p>Last element of list: Optional[any]</p>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable.Iterable.max">
<span class="sig-name descname"><span class="pre">max</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">func</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">Callable</span><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">int</span><span class="p"><span class="pre">,</span> </span><span class="pre">float</span><span class="p"><span class="pre">,</span> </span><span class="pre">complex</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.max" title="Permalink to this definition"></a></dt>
<dd><p>Returns highest value</p>
<blockquote>
<div><dl class="simple">
<dt>func: <code class="xref py py-class docutils literal notranslate"><span class="pre">Callable</span></code></dt><dd><p>selected value</p>
</dd>
</dl>
</div></blockquote>
<blockquote>
<div><p>Union[int, float, complex]</p>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable.Iterable.min">
<span class="sig-name descname"><span class="pre">min</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">func</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">Callable</span><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">int</span><span class="p"><span class="pre">,</span> </span><span class="pre">float</span><span class="p"><span class="pre">,</span> </span><span class="pre">complex</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.min" title="Permalink to this definition"></a></dt>
<dd><p>Returns highest value</p>
<blockquote>
<div><dl class="simple">
<dt>func: <code class="xref py py-class docutils literal notranslate"><span class="pre">Callable</span></code></dt><dd><p>selected value</p>
</dd>
</dl>
</div></blockquote>
<blockquote>
<div><p>Union[int, float, complex]</p>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable.Iterable.order_by">
<span class="sig-name descname"><span class="pre">order_by</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">func</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Callable</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="#cpl_query.extension.ordered_iterable_abc.OrderedIterableABC" title="cpl_query.extension.ordered_iterable_abc.OrderedIterableABC"><span class="pre">cpl_query.extension.ordered_iterable_abc.OrderedIterableABC</span></a></span></span><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.order_by" title="Permalink to this definition"></a></dt>
<dd><p>Sorts elements by function in ascending order</p>
<blockquote>
<div><dl class="simple">
<dt>func: <code class="xref py py-class docutils literal notranslate"><span class="pre">Callable</span></code></dt><dd><p>selected value</p>
</dd>
</dl>
</div></blockquote>
<blockquote>
<div><dl class="field-list simple">
<dt class="field-odd">class</dt>
<dd class="field-odd"><p><cite>cpl_query.extension.iterable_abc.IterableABC</cite></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable.Iterable.order_by_descending">
<span class="sig-name descname"><span class="pre">order_by_descending</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">func</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Callable</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="#cpl_query.extension.ordered_iterable_abc.OrderedIterableABC" title="cpl_query.extension.ordered_iterable_abc.OrderedIterableABC"><span class="pre">cpl_query.extension.ordered_iterable_abc.OrderedIterableABC</span></a></span></span><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.order_by_descending" title="Permalink to this definition"></a></dt>
<dd><p>Sorts elements by function in descending order</p>
<blockquote>
<div><dl class="simple">
<dt>func: <code class="xref py py-class docutils literal notranslate"><span class="pre">Callable</span></code></dt><dd><p>selected value</p>
</dd>
</dl>
</div></blockquote>
<blockquote>
<div><dl class="field-list simple">
<dt class="field-odd">class</dt>
<dd class="field-odd"><p><cite>cpl_query.extension.iterable_abc.IterableABC</cite></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable.Iterable.reverse">
<span class="sig-name descname"><span class="pre">reverse</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="#cpl_query.extension.iterable_abc.IterableABC" title="cpl_query.extension.iterable_abc.IterableABC"><span class="pre">cpl_query.extension.iterable_abc.IterableABC</span></a></span></span><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.reverse" title="Permalink to this definition"></a></dt>
<dd><p>Reverses list</p>
<blockquote>
<div><dl class="field-list simple">
<dt class="field-odd">class</dt>
<dd class="field-odd"><p><cite>cpl_query.extension.iterable_abc.IterableABC</cite></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable.Iterable.single">
<span class="sig-name descname"><span class="pre">single</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="#cpl_query.extension.iterable.Iterable.any" title="cpl_query.extension.iterable.Iterable.any"><span class="pre">cpl_query.extension.iterable.Iterable.any</span></a></span></span><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.single" title="Permalink to this definition"></a></dt>
<dd><p>Returns one single element of list</p>
<blockquote>
<div><p>Found value: any</p>
</div></blockquote>
<blockquote>
<div><p>ArgumentNoneException: when argument is None
Exception: when argument is None or found more than one element</p>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable.Iterable.single_or_default">
<span class="sig-name descname"><span class="pre">single_or_default</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="#cpl_query.extension.iterable.Iterable.any" title="cpl_query.extension.iterable.Iterable.any"><span class="pre">cpl_query.extension.iterable.Iterable.any</span></a><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.single_or_default" title="Permalink to this definition"></a></dt>
<dd><p>Returns one single element of list</p>
<blockquote>
<div><p>Found value: Optional[any]</p>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable.Iterable.skip">
<span class="sig-name descname"><span class="pre">skip</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">index</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="#cpl_query.extension.iterable_abc.IterableABC" title="cpl_query.extension.iterable_abc.IterableABC"><span class="pre">cpl_query.extension.iterable_abc.IterableABC</span></a></span></span><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.skip" title="Permalink to this definition"></a></dt>
<dd><p>Skips all elements from index</p>
<blockquote>
<div><dl class="simple">
<dt>index: <code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></dt><dd><p>index</p>
</dd>
</dl>
</div></blockquote>
<blockquote>
<div><dl class="field-list simple">
<dt class="field-odd">class</dt>
<dd class="field-odd"><p><cite>cpl_query.extension.iterable_abc.IterableABC</cite></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable.Iterable.skip_last">
<span class="sig-name descname"><span class="pre">skip_last</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">index</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="#cpl_query.extension.iterable_abc.IterableABC" title="cpl_query.extension.iterable_abc.IterableABC"><span class="pre">cpl_query.extension.iterable_abc.IterableABC</span></a></span></span><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.skip_last" title="Permalink to this definition"></a></dt>
<dd><p>Skips all elements after index</p>
<blockquote>
<div><dl class="simple">
<dt>index: <code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></dt><dd><p>index</p>
</dd>
</dl>
</div></blockquote>
<blockquote>
<div><dl class="field-list simple">
<dt class="field-odd">class</dt>
<dd class="field-odd"><p><cite>cpl_query.extension.iterable_abc.IterableABC</cite></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable.Iterable.sum">
<span class="sig-name descname"><span class="pre">sum</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">func</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">Callable</span><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">int</span><span class="p"><span class="pre">,</span> </span><span class="pre">float</span><span class="p"><span class="pre">,</span> </span><span class="pre">complex</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.sum" title="Permalink to this definition"></a></dt>
<dd><p>Sum of all values</p>
<blockquote>
<div><dl class="simple">
<dt>func: <code class="xref py py-class docutils literal notranslate"><span class="pre">Callable</span></code></dt><dd><p>selected value</p>
</dd>
</dl>
</div></blockquote>
<blockquote>
<div><p>Union[int, float, complex]</p>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable.Iterable.take">
<span class="sig-name descname"><span class="pre">take</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">index</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="#cpl_query.extension.iterable_abc.IterableABC" title="cpl_query.extension.iterable_abc.IterableABC"><span class="pre">cpl_query.extension.iterable_abc.IterableABC</span></a></span></span><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.take" title="Permalink to this definition"></a></dt>
<dd><p>Takes all elements from index</p>
<blockquote>
<div><dl class="simple">
<dt>index: <code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></dt><dd><p>index</p>
</dd>
</dl>
</div></blockquote>
<blockquote>
<div><dl class="field-list simple">
<dt class="field-odd">class</dt>
<dd class="field-odd"><p><cite>cpl_query.extension.iterable_abc.IterableABC</cite></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable.Iterable.take_last">
<span class="sig-name descname"><span class="pre">take_last</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">index</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">int</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="#cpl_query.extension.iterable_abc.IterableABC" title="cpl_query.extension.iterable_abc.IterableABC"><span class="pre">cpl_query.extension.iterable_abc.IterableABC</span></a></span></span><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.take_last" title="Permalink to this definition"></a></dt>
<dd><p>Takes all elements after index</p>
<blockquote>
<div><dl class="simple">
<dt>index: <code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></dt><dd><p>index</p>
</dd>
</dl>
</div></blockquote>
<blockquote>
<div><dl class="field-list simple">
<dt class="field-odd">class</dt>
<dd class="field-odd"><p><cite>cpl_query.extension.iterable_abc.IterableABC</cite></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.iterable.Iterable.where">
<span class="sig-name descname"><span class="pre">where</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">func</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Callable</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="#cpl_query.extension.iterable_abc.IterableABC" title="cpl_query.extension.iterable_abc.IterableABC"><span class="pre">cpl_query.extension.iterable_abc.IterableABC</span></a></span></span><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.where" title="Permalink to this definition"></a></dt>
<dd><p>Select element by function</p>
<blockquote>
<div><dl class="simple">
<dt>func: <code class="xref py py-class docutils literal notranslate"><span class="pre">Callable</span></code></dt><dd><p>selected value</p>
</dd>
</dl>
</div></blockquote>
<blockquote>
<div><dl class="field-list simple">
<dt class="field-odd">class</dt>
<dd class="field-odd"><p><cite>cpl_query.extension.iterable_abc.IterableABC</cite></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>
</dd></dl>
@ -248,7 +918,7 @@
<dl class="py class">
<dt class="sig sig-object py" id="cpl_query.extension.list.List">
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">cpl_query.extension.list.</span></span><span class="sig-name descname"><span class="pre">List</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">t</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">type</span><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">values</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><span class="pre">list</span><span class="p"><span class="pre">]</span></span></span> <span class="o"><span class="pre">=</span></span> <span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#cpl_query.extension.list.List" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">cpl_query.extension.iterable.Iterable</span></code></p>
<dd><p>Bases: <a class="reference internal" href="#cpl_query.extension.iterable.Iterable" title="cpl_query.extension.iterable.Iterable"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl_query.extension.iterable.Iterable</span></code></a></p>
<p>Implementation of :class: <cite>cpl_query.extension.iterable.Iterable</cite></p>
</dd></dl>
@ -285,6 +955,40 @@
</dd></dl>
</div>
<div class="section" id="module-cpl_query.extension.ordered_iterable">
<span id="cpl-query-extension-ordered-iterable"></span><h2>cpl_query.extension.ordered_iterable<a class="headerlink" href="#module-cpl_query.extension.ordered_iterable" title="Permalink to this headline"></a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="cpl_query.extension.ordered_iterable.OrderedIterable">
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">cpl_query.extension.ordered_iterable.</span></span><span class="sig-name descname"><span class="pre">OrderedIterable</span></span><a class="headerlink" href="#cpl_query.extension.ordered_iterable.OrderedIterable" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#cpl_query.extension.iterable.Iterable" title="cpl_query.extension.iterable.Iterable"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl_query.extension.iterable.Iterable</span></code></a>, <a class="reference internal" href="#cpl_query.extension.ordered_iterable_abc.OrderedIterableABC" title="cpl_query.extension.ordered_iterable_abc.OrderedIterableABC"><code class="xref py py-class docutils literal notranslate"><span class="pre">cpl_query.extension.ordered_iterable_abc.OrderedIterableABC</span></code></a></p>
<p>Implementation of :class: <cite>cpl_query.extension.Iterable</cite> <cite>cpl_query.extension.OrderedIterableABC</cite></p>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.ordered_iterable.OrderedIterable.then_by">
<span class="sig-name descname"><span class="pre">then_by</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">_func</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">collections.abc.Callable</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="#cpl_query.extension.ordered_iterable_abc.OrderedIterableABC" title="cpl_query.extension.ordered_iterable_abc.OrderedIterableABC"><span class="pre">cpl_query.extension.ordered_iterable_abc.OrderedIterableABC</span></a></span></span><a class="headerlink" href="#cpl_query.extension.ordered_iterable.OrderedIterable.then_by" title="Permalink to this definition"></a></dt>
<dd><p>Sorts OrderedList in ascending order by function</p>
<blockquote>
<div><p>func: <code class="xref py py-class docutils literal notranslate"><span class="pre">Callable</span></code></p>
</div></blockquote>
<blockquote>
<div><p>list of <code class="xref py py-class docutils literal notranslate"><span class="pre">cpl_query.extension.OrderedIterableABC</span></code></p>
</div></blockquote>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="cpl_query.extension.ordered_iterable.OrderedIterable.then_by_descending">
<span class="sig-name descname"><span class="pre">then_by_descending</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">_func</span></span><span class="p"><span class="pre">:</span></span> <span class="n"><span class="pre">collections.abc.Callable</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="#cpl_query.extension.ordered_iterable_abc.OrderedIterableABC" title="cpl_query.extension.ordered_iterable_abc.OrderedIterableABC"><span class="pre">cpl_query.extension.ordered_iterable_abc.OrderedIterableABC</span></a></span></span><a class="headerlink" href="#cpl_query.extension.ordered_iterable.OrderedIterable.then_by_descending" title="Permalink to this definition"></a></dt>
<dd><p>Sorts OrderedList in descending order by function</p>
<blockquote>
<div><p>func: <code class="xref py py-class docutils literal notranslate"><span class="pre">Callable</span></code></p>
</div></blockquote>
<blockquote>
<div><p>list of <code class="xref py py-class docutils literal notranslate"><span class="pre">cpl_query.extension.OrderedIterableABC</span></code></p>
</div></blockquote>
</dd></dl>
</dd></dl>
</div>
</div>

View File

@ -78,8 +78,10 @@
<ul>
<li class="toctree-l1"><a class="reference internal" href="cpl_query.extension.html">cpl_query.extension</a><ul>
<li class="toctree-l2"><a class="reference internal" href="cpl_query.extension.html#module-cpl_query.extension.iterable_abc">cpl_query.extension.iterable_abc</a></li>
<li class="toctree-l2"><a class="reference internal" href="cpl_query.extension.html#module-cpl_query.extension.iterable">cpl_query.extension.iterable</a></li>
<li class="toctree-l2"><a class="reference internal" href="cpl_query.extension.html#module-cpl_query.extension.list">cpl_query.extension.list</a></li>
<li class="toctree-l2"><a class="reference internal" href="cpl_query.extension.html#module-cpl_query.extension.ordered_iterable_abc">cpl_query.extension.ordered_iterable_abc</a></li>
<li class="toctree-l2"><a class="reference internal" href="cpl_query.extension.html#module-cpl_query.extension.ordered_iterable">cpl_query.extension.ordered_iterable</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="cpl_query.exceptions.html">cpl_query.exceptions</a><ul>

View File

@ -160,22 +160,30 @@
<li><a href="cpl_core.dependency_injection.html#cpl_core.dependency_injection.service_collection_abc.ServiceCollectionABC.add_transient">(cpl_core.dependency_injection.service_collection_abc.ServiceCollectionABC method)</a>
</li>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="cpl_core.configuration.html#cpl_core.configuration.configuration.Configuration.additional_arguments">additional_arguments (cpl_core.configuration.configuration.Configuration property)</a>
<ul>
<li><a href="cpl_core.configuration.html#cpl_core.configuration.configuration_abc.ConfigurationABC.additional_arguments">(cpl_core.configuration.configuration_abc.ConfigurationABC property)</a>
</li>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="cpl_query.tests.html#cpl_query.tests.models.Address">Address (class in cpl_query.tests.models)</a>
</li>
<li><a href="cpl_core.configuration.html#cpl_core.configuration.console_argument.ConsoleArgument.aliases">aliases (cpl_core.configuration.console_argument.ConsoleArgument property)</a>
</li>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.all">all() (cpl_query.extension.iterable_abc.IterableABC method)</a>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable.Iterable.all">all() (cpl_query.extension.iterable.Iterable method)</a>
<ul>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.all">(cpl_query.extension.iterable_abc.IterableABC method)</a>
</li>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.any">any() (cpl_query.extension.iterable_abc.IterableABC method)</a>
</ul></li>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable.Iterable.any">any() (cpl_query.extension.iterable.Iterable method)</a>
<ul>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.any">(cpl_query.extension.iterable_abc.IterableABC method)</a>
</li>
</ul></li>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.append">append() (cpl_query.extension.iterable_abc.IterableABC method)</a>
</li>
<li><a href="cpl_core.environment.html#cpl_core.environment.application_environment.ApplicationEnvironment.application_name">application_name (cpl_core.environment.application_environment.ApplicationEnvironment property)</a>
@ -210,8 +218,12 @@
<li><a href="cpl_core.database.html#cpl_core.database.database_settings_name_enum.DatabaseSettingsNameEnum.auth_plugin">(cpl_core.database.database_settings_name_enum.DatabaseSettingsNameEnum attribute)</a>
</li>
</ul></li>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.average">average() (cpl_query.extension.iterable_abc.IterableABC method)</a>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable.Iterable.average">average() (cpl_query.extension.iterable.Iterable method)</a>
<ul>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.average">(cpl_query.extension.iterable_abc.IterableABC method)</a>
</li>
</ul></li>
</ul></td>
</tr></table>
@ -320,14 +332,22 @@
</li>
<li><a href="cpl_core.console.html#cpl_core.console.console_call.ConsoleCall">ConsoleCall (class in cpl_core.console.console_call)</a>
</li>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.contains">contains() (cpl_query.extension.iterable_abc.IterableABC method)</a>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable.Iterable.contains">contains() (cpl_query.extension.iterable.Iterable method)</a>
<ul>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.contains">(cpl_query.extension.iterable_abc.IterableABC method)</a>
</li>
</ul></li>
<li><a href="cpl_core.utils.html#cpl_core.utils.string.String.convert_to_camel_case">convert_to_camel_case() (cpl_core.utils.string.String static method)</a>
</li>
<li><a href="cpl_core.utils.html#cpl_core.utils.string.String.convert_to_snake_case">convert_to_snake_case() (cpl_core.utils.string.String static method)</a>
</li>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.count">count() (cpl_query.extension.iterable_abc.IterableABC method)</a>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable.Iterable.count">count() (cpl_query.extension.iterable.Iterable method)</a>
<ul>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.count">(cpl_query.extension.iterable_abc.IterableABC method)</a>
</li>
</ul></li>
<li>
cpl_core.application.application_abc
@ -650,6 +670,13 @@
<ul>
<li><a href="cpl_query.exceptions.html#module-cpl_query.exceptions">module</a>
</li>
</ul></li>
<li>
cpl_query.extension.iterable
<ul>
<li><a href="cpl_query.extension.html#module-cpl_query.extension.iterable">module</a>
</li>
</ul></li>
<li>
@ -664,6 +691,13 @@
<ul>
<li><a href="cpl_query.extension.html#module-cpl_query.extension.list">module</a>
</li>
</ul></li>
<li>
cpl_query.extension.ordered_iterable
<ul>
<li><a href="cpl_query.extension.html#module-cpl_query.extension.ordered_iterable">module</a>
</li>
</ul></li>
<li>
@ -806,8 +840,12 @@
</li>
<li><a href="cpl_core.console.html#cpl_core.console.console.Console.disable">disable() (cpl_core.console.console.Console class method)</a>
</li>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.distinct">distinct() (cpl_query.extension.iterable_abc.IterableABC method)</a>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable.Iterable.distinct">distinct() (cpl_query.extension.iterable.Iterable method)</a>
<ul>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.distinct">(cpl_query.extension.iterable_abc.IterableABC method)</a>
</li>
</ul></li>
</ul></td>
</tr></table>
@ -820,10 +858,18 @@
<li><a href="cpl_core.database.html#cpl_core.database.database_settings_name_enum.DatabaseSettingsNameEnum.echo">(cpl_core.database.database_settings_name_enum.DatabaseSettingsNameEnum attribute)</a>
</li>
</ul></li>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.element_at">element_at() (cpl_query.extension.iterable_abc.IterableABC method)</a>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable.Iterable.element_at">element_at() (cpl_query.extension.iterable.Iterable method)</a>
<ul>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.element_at">(cpl_query.extension.iterable_abc.IterableABC method)</a>
</li>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.element_at_or_default">element_at_or_default() (cpl_query.extension.iterable_abc.IterableABC method)</a>
</ul></li>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable.Iterable.element_at_or_default">element_at_or_default() (cpl_query.extension.iterable.Iterable method)</a>
<ul>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.element_at_or_default">(cpl_query.extension.iterable_abc.IterableABC method)</a>
</li>
</ul></li>
<li><a href="cpl_core.mailing.html#cpl_core.mailing.email.EMail">EMail (class in cpl_core.mailing.email)</a>
</li>
<li><a href="cpl_core.mailing.html#cpl_core.mailing.email_client_service.EMailClient">EMailClient (class in cpl_core.mailing.email_client_service)</a>
@ -850,6 +896,8 @@
<li><a href="cpl_core.environment.html#cpl_core.environment.application_environment_abc.ApplicationEnvironmentABC.end_time">(cpl_core.environment.application_environment_abc.ApplicationEnvironmentABC property)</a>
</li>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="cpl_core.database.connection.html#cpl_core.database.connection.database_connection.DatabaseConnection.engine">engine (cpl_core.database.connection.database_connection.DatabaseConnection property)</a>
<ul>
@ -860,8 +908,6 @@
<li><a href="cpl_core.database.context.html#cpl_core.database.context.database_context_abc.DatabaseContextABC.engine">(cpl_core.database.context.database_context_abc.DatabaseContextABC property)</a>
</li>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="cpl_core.configuration.html#cpl_core.configuration.configuration.Configuration.environment">environment (cpl_core.configuration.configuration.Configuration property)</a>
<ul>
@ -916,18 +962,30 @@
<li><a href="cpl_core.logging.html#cpl_core.logging.logging_settings_name_enum.LoggingSettingsNameEnum.filename">(cpl_core.logging.logging_settings_name_enum.LoggingSettingsNameEnum attribute)</a>
</li>
</ul></li>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.first">first() (cpl_query.extension.iterable_abc.IterableABC method)</a>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable.Iterable.first">first() (cpl_query.extension.iterable.Iterable method)</a>
<ul>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.first">(cpl_query.extension.iterable_abc.IterableABC method)</a>
</li>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.first_or_default">first_or_default() (cpl_query.extension.iterable_abc.IterableABC method)</a>
</ul></li>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable.Iterable.first_or_default">first_or_default() (cpl_query.extension.iterable.Iterable method)</a>
<ul>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.first_or_default">(cpl_query.extension.iterable_abc.IterableABC method)</a>
</li>
</ul></li>
<li><a href="cpl_core.utils.html#cpl_core.utils.string.String.first_to_lower">first_to_lower() (cpl_core.utils.string.String static method)</a>
</li>
<li><a href="cpl_core.utils.html#cpl_core.utils.string.String.first_to_upper">first_to_upper() (cpl_core.utils.string.String static method)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.for_each">for_each() (cpl_query.extension.iterable_abc.IterableABC method)</a>
<li><a href="cpl_core.utils.html#cpl_core.utils.string.String.first_to_upper">first_to_upper() (cpl_core.utils.string.String static method)</a>
</li>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable.Iterable.for_each">for_each() (cpl_query.extension.iterable.Iterable method)</a>
<ul>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.for_each">(cpl_query.extension.iterable_abc.IterableABC method)</a>
</li>
</ul></li>
<li><a href="cpl_core.console.html#cpl_core.console.console.Console.foreground_color">foreground_color (cpl_core.console.console.Console property)</a>
</li>
<li><a href="cpl_core.console.html#cpl_core.console.foreground_color_enum.ForegroundColorEnum">ForegroundColorEnum (class in cpl_core.console.foreground_color_enum)</a>
@ -1045,6 +1103,8 @@
<li><a href="cpl_query.exceptions.html#cpl_query.exceptions.InvalidTypeException">InvalidTypeException</a>
</li>
<li><a href="cpl_core.configuration.html#cpl_core.configuration.console_argument.ConsoleArgument.is_value_token_optional">is_value_token_optional (cpl_core.configuration.console_argument.ConsoleArgument property)</a>
</li>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable.Iterable">Iterable (class in cpl_query.extension.iterable)</a>
</li>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC">IterableABC (class in cpl_query.extension.iterable_abc)</a>
</li>
@ -1056,20 +1116,28 @@
<h2 id="L">L</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.last">last() (cpl_query.extension.iterable_abc.IterableABC method)</a>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable.Iterable.last">last() (cpl_query.extension.iterable.Iterable method)</a>
<ul>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.last">(cpl_query.extension.iterable_abc.IterableABC method)</a>
</li>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.last_or_default">last_or_default() (cpl_query.extension.iterable_abc.IterableABC method)</a>
</ul></li>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable.Iterable.last_or_default">last_or_default() (cpl_query.extension.iterable.Iterable method)</a>
<ul>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.last_or_default">(cpl_query.extension.iterable_abc.IterableABC method)</a>
</li>
</ul></li>
<li><a href="cpl_core.logging.html#cpl_core.logging.logging_settings.LoggingSettings.level">level (cpl_core.logging.logging_settings.LoggingSettings property)</a>
</li>
<li><a href="cpl_core.dependency_injection.html#cpl_core.dependency_injection.service_descriptor.ServiceDescriptor.lifetime">lifetime (cpl_core.dependency_injection.service_descriptor.ServiceDescriptor property)</a>
</li>
<li><a href="cpl_query.extension.html#cpl_query.extension.list.List">List (class in cpl_query.extension.list)</a>
</li>
<li><a href="cpl_query.exceptions.html#cpl_query.exceptions.ExceptionArgument.list">list (cpl_query.exceptions.ExceptionArgument attribute)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="cpl_query.exceptions.html#cpl_query.exceptions.ExceptionArgument.list">list (cpl_query.exceptions.ExceptionArgument attribute)</a>
</li>
<li><a href="cpl_core.logging.html#cpl_core.logging.logger_service.Logger">Logger (class in cpl_core.logging.logger_service)</a>
</li>
<li><a href="cpl_core.logging.html#cpl_core.logging.logger_abc.LoggerABC">LoggerABC (class in cpl_core.logging.logger_abc)</a>
@ -1096,10 +1164,18 @@
</ul></li>
<li><a href="cpl_core.application.html#cpl_core.application.application_abc.ApplicationABC.main">main() (cpl_core.application.application_abc.ApplicationABC method)</a>
</li>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.max">max() (cpl_query.extension.iterable_abc.IterableABC method)</a>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable.Iterable.max">max() (cpl_query.extension.iterable.Iterable method)</a>
<ul>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.max">(cpl_query.extension.iterable_abc.IterableABC method)</a>
</li>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.min">min() (cpl_query.extension.iterable_abc.IterableABC method)</a>
</ul></li>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable.Iterable.min">min() (cpl_query.extension.iterable.Iterable method)</a>
<ul>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.min">(cpl_query.extension.iterable_abc.IterableABC method)</a>
</li>
</ul></li>
<li>
module
@ -1195,10 +1271,14 @@
<li><a href="cpl_core.utils.html#module-cpl_core.utils.string">cpl_core.utils.string</a>
</li>
<li><a href="cpl_query.exceptions.html#module-cpl_query.exceptions">cpl_query.exceptions</a>
</li>
<li><a href="cpl_query.extension.html#module-cpl_query.extension.iterable">cpl_query.extension.iterable</a>
</li>
<li><a href="cpl_query.extension.html#module-cpl_query.extension.iterable_abc">cpl_query.extension.iterable_abc</a>
</li>
<li><a href="cpl_query.extension.html#module-cpl_query.extension.list">cpl_query.extension.list</a>
</li>
<li><a href="cpl_query.extension.html#module-cpl_query.extension.ordered_iterable">cpl_query.extension.ordered_iterable</a>
</li>
<li><a href="cpl_query.extension.html#module-cpl_query.extension.ordered_iterable_abc">cpl_query.extension.ordered_iterable_abc</a>
</li>
@ -1233,11 +1313,21 @@
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="cpl_core.logging.html#cpl_core.logging.logging_level_enum.LoggingLevelEnum.OFF">OFF (cpl_core.logging.logging_level_enum.LoggingLevelEnum attribute)</a>
</li>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.order_by">order_by() (cpl_query.extension.iterable_abc.IterableABC method)</a>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable.Iterable.order_by">order_by() (cpl_query.extension.iterable.Iterable method)</a>
<ul>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.order_by">(cpl_query.extension.iterable_abc.IterableABC method)</a>
</li>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.order_by_descending">order_by_descending() (cpl_query.extension.iterable_abc.IterableABC method)</a>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable.Iterable.order_by_descending">order_by_descending() (cpl_query.extension.iterable.Iterable method)</a>
<ul>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.order_by_descending">(cpl_query.extension.iterable_abc.IterableABC method)</a>
</li>
</ul></li>
<li><a href="cpl_query.extension.html#cpl_query.extension.ordered_iterable.OrderedIterable">OrderedIterable (class in cpl_query.extension.ordered_iterable)</a>
</li>
<li><a href="cpl_query.extension.html#cpl_query.extension.ordered_iterable_abc.OrderedIterableABC">OrderedIterableABC (class in cpl_query.extension.ordered_iterable_abc)</a>
</li>
@ -1301,8 +1391,12 @@
</li>
<li><a href="cpl_core.utils.html#cpl_core.utils.pip.Pip.reset_executable">reset_executable() (cpl_core.utils.pip.Pip class method)</a>
</li>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.reverse">reverse() (cpl_query.extension.iterable_abc.IterableABC method)</a>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable.Iterable.reverse">reverse() (cpl_query.extension.iterable.Iterable method)</a>
<ul>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.reverse">(cpl_query.extension.iterable_abc.IterableABC method)</a>
</li>
</ul></li>
<li><a href="cpl_core.application.html#cpl_core.application.application_abc.ApplicationABC.run">run() (cpl_core.application.application_abc.ApplicationABC method)</a>
<ul>
@ -1371,14 +1465,14 @@
</li>
<li><a href="cpl_core.console.html#cpl_core.console.console.Console.set_hold_back">set_hold_back() (cpl_core.console.console.Console class method)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="cpl_core.environment.html#cpl_core.environment.application_environment.ApplicationEnvironment.set_runtime_directory">set_runtime_directory() (cpl_core.environment.application_environment.ApplicationEnvironment method)</a>
<ul>
<li><a href="cpl_core.environment.html#cpl_core.environment.application_environment_abc.ApplicationEnvironmentABC.set_runtime_directory">(cpl_core.environment.application_environment_abc.ApplicationEnvironmentABC method)</a>
</li>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="cpl_core.environment.html#cpl_core.environment.application_environment.ApplicationEnvironment.set_working_directory">set_working_directory() (cpl_core.environment.application_environment.ApplicationEnvironment method)</a>
<ul>
@ -1391,16 +1485,32 @@
<li><a href="cpl_query.tests.html#cpl_query.tests.query_test.QueryTest.setUp">(cpl_query.tests.query_test.QueryTest method)</a>
</li>
</ul></li>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.single">single() (cpl_query.extension.iterable_abc.IterableABC method)</a>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable.Iterable.single">single() (cpl_query.extension.iterable.Iterable method)</a>
<ul>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.single">(cpl_query.extension.iterable_abc.IterableABC method)</a>
</li>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.single_or_default">single_or_default() (cpl_query.extension.iterable_abc.IterableABC method)</a>
</ul></li>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable.Iterable.single_or_default">single_or_default() (cpl_query.extension.iterable.Iterable method)</a>
<ul>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.single_or_default">(cpl_query.extension.iterable_abc.IterableABC method)</a>
</li>
</ul></li>
<li><a href="cpl_core.dependency_injection.html#cpl_core.dependency_injection.service_lifetime_enum.ServiceLifetimeEnum.singleton">singleton (cpl_core.dependency_injection.service_lifetime_enum.ServiceLifetimeEnum attribute)</a>
</li>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.skip">skip() (cpl_query.extension.iterable_abc.IterableABC method)</a>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable.Iterable.skip">skip() (cpl_query.extension.iterable.Iterable method)</a>
<ul>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.skip">(cpl_query.extension.iterable_abc.IterableABC method)</a>
</li>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.skip_last">skip_last() (cpl_query.extension.iterable_abc.IterableABC method)</a>
</ul></li>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable.Iterable.skip_last">skip_last() (cpl_query.extension.iterable.Iterable method)</a>
<ul>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.skip_last">(cpl_query.extension.iterable_abc.IterableABC method)</a>
</li>
</ul></li>
<li><a href="cpl_core.console.html#cpl_core.console.console.Console.spinner">spinner() (cpl_core.console.console.Console class method)</a>
</li>
<li><a href="cpl_core.console.html#cpl_core.console.spinner_thread.SpinnerThread">SpinnerThread (class in cpl_core.console.spinner_thread)</a>
@ -1423,8 +1533,12 @@
</li>
<li><a href="cpl_core.mailing.html#cpl_core.mailing.email.EMail.subject">subject (cpl_core.mailing.email.EMail property)</a>
</li>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.sum">sum() (cpl_query.extension.iterable_abc.IterableABC method)</a>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable.Iterable.sum">sum() (cpl_query.extension.iterable.Iterable method)</a>
<ul>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.sum">(cpl_query.extension.iterable_abc.IterableABC method)</a>
</li>
</ul></li>
</ul></td>
</tr></table>
@ -1433,10 +1547,18 @@
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="cpl_core.console.html#cpl_core.console.console.Console.table">table() (cpl_core.console.console.Console class method)</a>
</li>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.take">take() (cpl_query.extension.iterable_abc.IterableABC method)</a>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable.Iterable.take">take() (cpl_query.extension.iterable.Iterable method)</a>
<ul>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.take">(cpl_query.extension.iterable_abc.IterableABC method)</a>
</li>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.take_last">take_last() (cpl_query.extension.iterable_abc.IterableABC method)</a>
</ul></li>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable.Iterable.take_last">take_last() (cpl_query.extension.iterable.Iterable method)</a>
<ul>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.take_last">(cpl_query.extension.iterable_abc.IterableABC method)</a>
</li>
</ul></li>
<li><a href="cpl_query.tests.html#cpl_query.tests.query_test.QueryTest.test_all">test_all() (cpl_query.tests.query_test.QueryTest method)</a>
</li>
<li><a href="cpl_query.tests.html#cpl_query.tests.query_test.QueryTest.test_any">test_any() (cpl_query.tests.query_test.QueryTest method)</a>
@ -1501,10 +1623,18 @@
</li>
<li><a href="cpl_core.environment.html#cpl_core.environment.environment_name_enum.EnvironmentNameEnum.testing">testing (cpl_core.environment.environment_name_enum.EnvironmentNameEnum attribute)</a>
</li>
<li><a href="cpl_query.extension.html#cpl_query.extension.ordered_iterable_abc.OrderedIterableABC.then_by">then_by() (cpl_query.extension.ordered_iterable_abc.OrderedIterableABC method)</a>
<li><a href="cpl_query.extension.html#cpl_query.extension.ordered_iterable.OrderedIterable.then_by">then_by() (cpl_query.extension.ordered_iterable.OrderedIterable method)</a>
<ul>
<li><a href="cpl_query.extension.html#cpl_query.extension.ordered_iterable_abc.OrderedIterableABC.then_by">(cpl_query.extension.ordered_iterable_abc.OrderedIterableABC method)</a>
</li>
<li><a href="cpl_query.extension.html#cpl_query.extension.ordered_iterable_abc.OrderedIterableABC.then_by_descending">then_by_descending() (cpl_query.extension.ordered_iterable_abc.OrderedIterableABC method)</a>
</ul></li>
<li><a href="cpl_query.extension.html#cpl_query.extension.ordered_iterable.OrderedIterable.then_by_descending">then_by_descending() (cpl_query.extension.ordered_iterable.OrderedIterable method)</a>
<ul>
<li><a href="cpl_query.extension.html#cpl_query.extension.ordered_iterable_abc.OrderedIterableABC.then_by_descending">(cpl_query.extension.ordered_iterable_abc.OrderedIterableABC method)</a>
</li>
</ul></li>
<li><a href="cpl_core.time.html#cpl_core.time.time_format_settings.TimeFormatSettings.time_format">time_format (cpl_core.time.time_format_settings.TimeFormatSettings property)</a>
<ul>
@ -1593,8 +1723,12 @@
<li><a href="cpl_core.logging.html#cpl_core.logging.logger_service.Logger.warn">(cpl_core.logging.logger_service.Logger method)</a>
</li>
</ul></li>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.where">where() (cpl_query.extension.iterable_abc.IterableABC method)</a>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable.Iterable.where">where() (cpl_query.extension.iterable.Iterable method)</a>
<ul>
<li><a href="cpl_query.extension.html#cpl_query.extension.iterable_abc.IterableABC.where">(cpl_query.extension.iterable_abc.IterableABC method)</a>
</li>
</ul></li>
<li><a href="cpl_core.console.html#cpl_core.console.background_color_enum.BackgroundColorEnum.white">white (cpl_core.console.background_color_enum.BackgroundColorEnum attribute)</a>
<ul>

View File

@ -249,8 +249,10 @@
<li class="toctree-l1"><a class="reference internal" href="cpl_query.html">Query Reference</a><ul>
<li class="toctree-l2"><a class="reference internal" href="cpl_query.extension.html">cpl_query.extension</a><ul>
<li class="toctree-l3"><a class="reference internal" href="cpl_query.extension.html#module-cpl_query.extension.iterable_abc">cpl_query.extension.iterable_abc</a></li>
<li class="toctree-l3"><a class="reference internal" href="cpl_query.extension.html#module-cpl_query.extension.iterable">cpl_query.extension.iterable</a></li>
<li class="toctree-l3"><a class="reference internal" href="cpl_query.extension.html#module-cpl_query.extension.list">cpl_query.extension.list</a></li>
<li class="toctree-l3"><a class="reference internal" href="cpl_query.extension.html#module-cpl_query.extension.ordered_iterable_abc">cpl_query.extension.ordered_iterable_abc</a></li>
<li class="toctree-l3"><a class="reference internal" href="cpl_query.extension.html#module-cpl_query.extension.ordered_iterable">cpl_query.extension.ordered_iterable</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="cpl_query.exceptions.html">cpl_query.exceptions</a><ul>

Binary file not shown.

View File

@ -321,6 +321,11 @@
<td>&#160;&#160;&#160;
<a href="cpl_query.exceptions.html#module-cpl_query.exceptions"><code class="xref">cpl_query.exceptions</code></a></td><td>
<em></em></td></tr>
<tr class="cg-2">
<td></td>
<td>&#160;&#160;&#160;
<a href="cpl_query.extension.html#module-cpl_query.extension.iterable"><code class="xref">cpl_query.extension.iterable</code></a></td><td>
<em></em></td></tr>
<tr class="cg-2">
<td></td>
<td>&#160;&#160;&#160;
@ -331,6 +336,11 @@
<td>&#160;&#160;&#160;
<a href="cpl_query.extension.html#module-cpl_query.extension.list"><code class="xref">cpl_query.extension.list</code></a></td><td>
<em></em></td></tr>
<tr class="cg-2">
<td></td>
<td>&#160;&#160;&#160;
<a href="cpl_query.extension.html#module-cpl_query.extension.ordered_iterable"><code class="xref">cpl_query.extension.ordered_iterable</code></a></td><td>
<em></em></td></tr>
<tr class="cg-2">
<td></td>
<td>&#160;&#160;&#160;

File diff suppressed because one or more lines are too long

View File

@ -8,6 +8,14 @@ cpl_query.extension.iterable_abc
:members:
:undoc-members:
:show-inheritance:
cpl_query.extension.iterable
----------------------------------------------------
.. automodule:: cpl_query.extension.iterable
:members:
:undoc-members:
:show-inheritance:
cpl_query.extension.list
----------------------------------------------------
@ -21,6 +29,14 @@ cpl_query.extension.ordered_iterable_abc
----------------------------------------------------
.. automodule:: cpl_query.extension.ordered_iterable_abc
:members:
:undoc-members:
:show-inheritance:
cpl_query.extension.ordered_iterable
----------------------------------------------------
.. automodule:: cpl_query.extension.ordered_iterable
:members:
:undoc-members:
:show-inheritance:

View File

@ -3,6 +3,8 @@ from typing import Optional, Callable, Union, Iterable
class IterableABC(ABC, list):
r"""ABC to define functions on list
"""
@abstractmethod
def __init__(self, t: type = None, values: list = None):
@ -21,12 +23,43 @@ class IterableABC(ABC, list):
return self._type
@abstractmethod
def any(self, func: Callable) -> bool: pass
def all(self, func: Callable) -> bool:
r"""Checks if every element of list equals result found by function
Parameter
---------
func: :class:`Callable`
selected value
Returns
-------
bool
"""
pass
@abstractmethod
def all(self, func: Callable) -> bool: pass
def any(self, func: Callable) -> bool:
r"""Checks if list contains result found by function
Parameter
---------
func: :class:`Callable`
selected value
Returns
-------
bool
"""
pass
def append(self, __object: object) -> None:
r"""Adds element to list
Parameter
---------
__object: :class:`object`
value
"""
if self._type is not None and type(__object) != self._type and not isinstance(type(__object), self._type) \
and not issubclass(type(__object), self._type):
raise Exception(f'Unexpected type: {type(__object)}')
@ -37,80 +70,347 @@ class IterableABC(ABC, list):
super().append(__object)
@abstractmethod
def average(self, func: Callable = None) -> Union[int, float, complex]: pass
def average(self, func: Callable = None) -> Union[int, float, complex]:
r"""Returns average value of list
Parameter
---------
func: :class:`Callable`
selected value
Returns
-------
Union[int, float, complex]
"""
pass
@abstractmethod
def contains(self, value: object) -> bool: pass
def contains(self, value: object) -> bool:
r"""Checks if list contains value given by function
Parameter
---------
value: :class:`object`
value
Returns
-------
bool
"""
pass
@abstractmethod
def count(self, func: Callable) -> int: pass
def count(self, func: Callable) -> int:
r"""Returns length of list or count of found elements
Parameter
---------
func: :class:`Callable`
selected value
Returns
-------
int
"""
pass
@abstractmethod
def distinct(self, func: Callable) -> 'IterableABC': pass
def distinct(self, func: Callable) -> 'IterableABC':
r"""Returns list without redundancies
Parameter
---------
func: :class:`Callable`
selected value
Returns
-------
:class: `cpl_query.extension.iterable_abc.IterableABC`
"""
pass
@abstractmethod
def element_at(self, index: int) -> any: pass
def element_at(self, index: int) -> any:
r"""Returns element at given index
Parameter
---------
index: :class:`int`
index
Returns
-------
Value at index: any
"""
pass
@abstractmethod
def element_at_or_default(self, index: int) -> Optional[any]: pass
def element_at_or_default(self, index: int) -> Optional[any]:
r"""Returns element at given index or None
Parameter
---------
index: :class:`int`
index
Returns
-------
Value at index: Optional[any]
"""
pass
def extend(self, __iterable: Iterable) -> None:
r"""Adds elements of given list to list
Parameter
---------
__iterable: :class: `cpl_query.extension.iterable.Iterable`
index
"""
for value in __iterable:
self.append(value)
@abstractmethod
def last(self) -> any: pass
def last(self) -> any:
r"""Returns last element
Returns
-------
Last element of list: any
"""
pass
@abstractmethod
def last_or_default(self) -> any: pass
def last_or_default(self) -> any:
r"""Returns last element or None
Returns
-------
Last element of list: Optional[any]
"""
pass
@abstractmethod
def first(self) -> any: pass
def first(self) -> any:
r"""Returns first element
Returns
-------
First element of list: any
"""
pass
@abstractmethod
def first_or_default(self) -> any: pass
def first_or_default(self) -> any:
r"""Returns first element or None
Returns
-------
First element of list: Optional[any]
"""
pass
@abstractmethod
def for_each(self, func: Callable) -> Union[int, float, complex]: pass
def for_each(self, func: Callable):
r"""Runs given function for each element of list
Parameter
---------
func: :class: `Callable`
function to call
"""
pass
@abstractmethod
def max(self, func: Callable = None) -> Union[int, float, complex]: pass
def max(self, func: Callable = None) -> Union[int, float, complex]:
r"""Returns highest value
Parameter
---------
func: :class:`Callable`
selected value
Returns
-------
Union[int, float, complex]
"""
pass
@abstractmethod
def min(self, func: Callable = None) -> Union[int, float, complex]: pass
def min(self, func: Callable = None) -> Union[int, float, complex]:
r"""Returns highest value
Parameter
---------
func: :class:`Callable`
selected value
Returns
-------
Union[int, float, complex]
"""
pass
@abstractmethod
def order_by(self, func: Callable) -> 'IterableABC': pass
def order_by(self, func: Callable) -> 'IterableABC':
r"""Sorts elements by function in ascending order
Parameter
---------
func: :class:`Callable`
selected value
Returns
-------
:class: `cpl_query.extension.iterable_abc.IterableABC`
"""
pass
@abstractmethod
def order_by_descending(self, func: Callable) -> 'IterableABC': pass
def order_by_descending(self, func: Callable) -> 'IterableABC':
r"""Sorts elements by function in descending order
Parameter
---------
func: :class:`Callable`
selected value
Returns
-------
:class: `cpl_query.extension.iterable_abc.IterableABC`
"""
pass
@abstractmethod
def reverse(self) -> 'IterableABC': pass
def reverse(self) -> 'IterableABC':
r"""Reverses list
Returns
-------
:class: `cpl_query.extension.iterable_abc.IterableABC`
"""
pass
@abstractmethod
def single(self) -> any: pass
def single(self) -> any:
r"""Returns one single element of list
Returns
-------
Found value: any
Raises
------
ArgumentNoneException: when argument is None
Exception: when argument is None or found more than one element
"""
pass
@abstractmethod
def single_or_default(self) -> Optional[any]: pass
def single_or_default(self) -> Optional[any]:
r"""Returns one single element of list
Returns
-------
Found value: Optional[any]
"""
pass
@abstractmethod
def skip(self, index: int) -> 'IterableABC': pass
def skip(self, index: int) -> 'IterableABC':
r"""Skips all elements from index
Parameter
---------
index: :class:`int`
index
Returns
-------
:class: `cpl_query.extension.iterable_abc.IterableABC`
"""
pass
@abstractmethod
def skip_last(self, index: int) -> 'IterableABC': pass
def skip_last(self, index: int) -> 'IterableABC':
r"""Skips all elements after index
Parameter
---------
index: :class:`int`
index
Returns
-------
:class: `cpl_query.extension.iterable_abc.IterableABC`
"""
pass
@abstractmethod
def sum(self, func: Callable = None) -> Union[int, float, complex]: pass
def sum(self, func: Callable = None) -> Union[int, float, complex]:
r"""Sum of all values
Parameter
---------
func: :class:`Callable`
selected value
Returns
-------
Union[int, float, complex]
"""
pass
@abstractmethod
def take(self, index: int) -> 'IterableABC': pass
def take(self, index: int) -> 'IterableABC':
r"""Takes all elements from index
Parameter
---------
index: :class:`int`
index
Returns
-------
:class: `cpl_query.extension.iterable_abc.IterableABC`
"""
pass
@abstractmethod
def take_last(self, index: int) -> 'IterableABC': pass
def take_last(self, index: int) -> 'IterableABC':
r"""Takes all elements after index
Parameter
---------
index: :class:`int`
index
Returns
-------
:class: `cpl_query.extension.iterable_abc.IterableABC`
"""
pass
def to_list(self) -> list:
r"""Converts :class: `cpl_query.extension.iterable_abc.IterableABC` to :class: `list`
Returns
-------
:class: `list`
"""
return list(self)
@abstractmethod
def where(self, func: Callable) -> 'IterableABC': pass
def where(self, func: Callable) -> 'IterableABC':
r"""Select element by function
Parameter
---------
func: :class:`Callable`
selected value
Returns
-------
:class: `cpl_query.extension.iterable_abc.IterableABC`
"""
pass