sh_cpl/docs/build/html/cpl_query.extension.html

1133 lines
79 KiB
HTML
Raw Normal View History

2021-12-02 08:20:38 +01:00
2021-11-01 21:17:56 +01:00
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
2021-12-02 08:20:38 +01:00
2021-11-01 21:17:56 +01:00
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
2021-12-02 08:20:38 +01:00
2021-11-01 21:17:56 +01:00
<title>cpl_query.extension &mdash; Common Python Library documentation</title>
2021-12-02 08:20:38 +01:00
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
2021-11-01 21:17:56 +01:00
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
2021-12-02 08:20:38 +01:00
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
2021-11-01 21:17:56 +01:00
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
2021-12-02 08:20:38 +01:00
<script type="text/javascript" src="_static/js/theme.js"></script>
2021-11-01 21:17:56 +01:00
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="cpl_query.exceptions" href="cpl_query.exceptions.html" />
<link rel="prev" title="Query Reference" href="cpl_query.html" />
</head>
2021-12-02 08:20:38 +01:00
<body class="wy-body-for-nav">
2021-11-01 21:17:56 +01:00
<div class="wy-grid-for-nav">
2021-12-02 08:20:38 +01:00
2021-11-01 21:17:56 +01:00
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
2021-12-02 08:20:38 +01:00
2021-11-01 21:17:56 +01:00
<a href="index.html" class="icon icon-home"> Common Python Library
2021-12-02 08:20:38 +01:00
2021-11-01 21:17:56 +01:00
</a>
2021-12-02 08:20:38 +01:00
2021-11-01 21:17:56 +01:00
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
2021-12-02 08:20:38 +01:00
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
2021-11-01 21:17:56 +01:00
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="introduction.html">Introduction to the CPL Docs</a></li>
<li class="toctree-l1"><a class="reference internal" href="getting_started.html">Getting started</a></li>
<li class="toctree-l1"><a class="reference internal" href="cpl_cli.html">CLI Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="cpl_core.html">API Reference</a></li>
<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>
2021-11-02 17:45:45 +01:00
<li class="toctree-l3"><a class="reference internal" href="#module-cpl_query.extension.iterable_abc">cpl_query.extension.iterable_abc</a></li>
2021-11-02 18:41:30 +01:00
<li class="toctree-l3"><a class="reference internal" href="#module-cpl_query.extension.iterable">cpl_query.extension.iterable</a></li>
2021-11-02 17:45:45 +01:00
<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>
2021-11-02 18:41:30 +01:00
<li class="toctree-l3"><a class="reference internal" href="#module-cpl_query.extension.ordered_iterable">cpl_query.extension.ordered_iterable</a></li>
2021-11-01 21:17:56 +01:00
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="cpl_query.exceptions.html">cpl_query.exceptions</a></li>
</ul>
</li>
</ul>
2021-12-02 08:20:38 +01:00
2021-11-01 21:17:56 +01:00
</div>
2021-12-02 08:20:38 +01:00
2021-11-01 21:17:56 +01:00
</div>
</nav>
2021-12-02 08:20:38 +01:00
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
2021-11-01 21:17:56 +01:00
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">Common Python Library</a>
2021-12-02 08:20:38 +01:00
2021-11-01 21:17:56 +01:00
</nav>
2021-12-02 08:20:38 +01:00
2021-11-01 21:17:56 +01:00
<div class="wy-nav-content">
2021-12-02 08:20:38 +01:00
2021-11-01 21:17:56 +01:00
<div class="rst-content">
2021-12-02 08:20:38 +01:00
<div role="navigation" aria-label="breadcrumbs navigation">
2021-11-01 21:17:56 +01:00
<ul class="wy-breadcrumbs">
2021-12-02 08:20:38 +01:00
2021-11-01 21:17:56 +01:00
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
2021-12-02 08:20:38 +01:00
2021-11-01 21:17:56 +01:00
<li><a href="cpl_query.html">Query Reference</a> &raquo;</li>
2021-12-02 08:20:38 +01:00
2021-11-01 21:17:56 +01:00
<li>cpl_query.extension</li>
2021-12-02 08:20:38 +01:00
2021-11-01 21:17:56 +01:00
<li class="wy-breadcrumbs-aside">
2021-12-02 08:20:38 +01:00
2021-11-01 21:17:56 +01:00
<a href="_sources/cpl_query.extension.rst.txt" rel="nofollow"> View page source</a>
2021-12-02 08:20:38 +01:00
2021-11-01 21:17:56 +01:00
</li>
2021-12-02 08:20:38 +01:00
2021-11-01 21:17:56 +01:00
</ul>
2021-12-02 08:20:38 +01:00
2021-11-01 21:17:56 +01:00
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
2021-12-02 08:20:38 +01:00
2021-11-01 21:17:56 +01:00
<div class="section" id="cpl-query-extension">
2021-12-02 08:20:38 +01:00
<h1>cpl_query.extension<a class="headerlink" href="#cpl-query-extension" title="Permalink to this headline"></a></h1>
2021-11-02 17:45:45 +01:00
<div class="section" id="module-cpl_query.extension.iterable_abc">
2021-12-02 08:20:38 +01:00
<span id="cpl-query-extension-iterable-abc"></span><h2>cpl_query.extension.iterable_abc<a class="headerlink" href="#module-cpl_query.extension.iterable_abc" title="Permalink to this headline"></a></h2>
2021-11-02 17:45:45 +01:00
<dl class="py class">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable_abc.IterableABC">
<em class="property"><span class="pre">class</span> </em><code class="sig-prename descclassname"><span class="pre">cpl_query.extension.iterable_abc.</span></code><code class="sig-name descname"><span class="pre">IterableABC</span></code><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>
2021-11-02 17:45:45 +01:00
<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>
2021-11-02 18:41:30 +01:00
<p>ABC to define functions on list</p>
2021-11-02 17:45:45 +01:00
<dl class="py method">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable_abc.IterableABC.all">
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">all</span></code><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> &#x2192; <span class="pre">bool</span><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.all" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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>
2021-11-02 17:45:45 +01:00
<dl class="py method">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable_abc.IterableABC.any">
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">any</span></code><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> &#x2192; <span class="pre">bool</span><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.any" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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>
2021-11-02 17:45:45 +01:00
<dl class="py method">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable_abc.IterableABC.append">
<code class="sig-name descname"><span class="pre">append</span></code><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> &#x2192; <span class="pre">None</span><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.append" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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>
2021-11-02 17:45:45 +01:00
</dd></dl>
<dl class="py method">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable_abc.IterableABC.average">
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">average</span></code><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> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.average" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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>
2021-11-02 17:45:45 +01:00
<dl class="py method">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable_abc.IterableABC.contains">
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">contains</span></code><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> &#x2192; <span class="pre">bool</span><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.contains" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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>
2021-11-02 17:45:45 +01:00
<dl class="py method">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable_abc.IterableABC.count">
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">count</span></code><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> &#x2192; <span class="pre">int</span><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.count" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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>
2021-11-02 17:45:45 +01:00
</dd></dl>
<dl class="py method">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable_abc.IterableABC.distinct">
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">distinct</span></code><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> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.distinct" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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>
2021-11-02 17:45:45 +01:00
<dl class="py method">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable_abc.IterableABC.element_at">
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">element_at</span></code><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> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.element_at" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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>
2021-11-02 17:45:45 +01:00
<dl class="py method">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable_abc.IterableABC.element_at_or_default">
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">element_at_or_default</span></code><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> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.element_at_or_default" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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>
2021-11-02 17:45:45 +01:00
<dl class="py method">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable_abc.IterableABC.extend">
<code class="sig-name descname"><span class="pre">extend</span></code><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> &#x2192; <span class="pre">None</span><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.extend" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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>
2021-11-02 17:45:45 +01:00
</dd></dl>
<dl class="py method">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable_abc.IterableABC.first">
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">first</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.first" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<dd><p>Returns first element</p>
<blockquote>
<div><p>First element of list: any</p>
</div></blockquote>
</dd></dl>
2021-11-02 17:45:45 +01:00
<dl class="py method">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable_abc.IterableABC.first_or_default">
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">first_or_default</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.first_or_default" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<dd><p>Returns first element or None</p>
<blockquote>
<div><p>First element of list: Optional[any]</p>
</div></blockquote>
</dd></dl>
2021-11-02 17:45:45 +01:00
<dl class="py method">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable_abc.IterableABC.for_each">
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">for_each</span></code><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>
2021-11-02 18:41:30 +01:00
<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>
2021-11-02 17:45:45 +01:00
<dl class="py method">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable_abc.IterableABC.last">
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">last</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.last" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<dd><p>Returns last element</p>
<blockquote>
<div><p>Last element of list: any</p>
</div></blockquote>
</dd></dl>
2021-11-02 17:45:45 +01:00
<dl class="py method">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable_abc.IterableABC.last_or_default">
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">last_or_default</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.last_or_default" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<dd><p>Returns last element or None</p>
<blockquote>
<div><p>Last element of list: Optional[any]</p>
</div></blockquote>
</dd></dl>
2021-11-02 17:45:45 +01:00
<dl class="py method">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable_abc.IterableABC.max">
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">max</span></code><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> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.max" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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>
2021-11-02 17:45:45 +01:00
<dl class="py method">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable_abc.IterableABC.min">
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">min</span></code><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> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.min" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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>
2021-11-02 17:45:45 +01:00
<dl class="py method">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable_abc.IterableABC.order_by">
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">order_by</span></code><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> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.order_by" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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>
2021-11-02 17:45:45 +01:00
<dl class="py method">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable_abc.IterableABC.order_by_descending">
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">order_by_descending</span></code><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> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.order_by_descending" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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>
2021-11-02 17:45:45 +01:00
<dl class="py method">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable_abc.IterableABC.reverse">
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">reverse</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.reverse" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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>
2021-11-02 17:45:45 +01:00
</dd></dl>
<dl class="py method">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable_abc.IterableABC.single">
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">single</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.single" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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>
2021-11-02 17:45:45 +01:00
<dl class="py method">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable_abc.IterableABC.single_or_default">
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">single_or_default</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.single_or_default" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<dd><p>Returns one single element of list</p>
<blockquote>
<div><p>Found value: Optional[any]</p>
</div></blockquote>
</dd></dl>
2021-11-02 17:45:45 +01:00
<dl class="py method">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable_abc.IterableABC.skip">
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">skip</span></code><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> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.skip" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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>
2021-11-02 17:45:45 +01:00
<dl class="py method">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable_abc.IterableABC.skip_last">
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">skip_last</span></code><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> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.skip_last" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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>
2021-11-02 17:45:45 +01:00
<dl class="py method">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable_abc.IterableABC.sum">
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">sum</span></code><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> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.sum" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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>
2021-11-02 17:45:45 +01:00
<dl class="py method">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable_abc.IterableABC.take">
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">take</span></code><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> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.take" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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>
2021-11-02 17:45:45 +01:00
<dl class="py method">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable_abc.IterableABC.take_last">
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">take_last</span></code><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> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.take_last" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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>
2021-11-02 17:45:45 +01:00
<dl class="py method">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable_abc.IterableABC.to_list">
<code class="sig-name descname"><span class="pre">to_list</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; <span class="pre">list</span><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.to_list" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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>
2021-11-02 17:45:45 +01:00
2021-12-02 08:20:38 +01:00
<dl class="py method">
<dt id="cpl_query.extension.iterable_abc.IterableABC.type">
<em class="property"><span class="pre">property</span> </em><code class="sig-name descname"><span class="pre">type</span></code><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.type" title="Permalink to this definition"></a></dt>
2021-11-02 17:45:45 +01:00
<dd></dd></dl>
<dl class="py method">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable_abc.IterableABC.where">
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">where</span></code><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> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.iterable_abc.IterableABC.where" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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">
2021-12-02 08:20:38 +01:00
<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>
2021-11-02 18:41:30 +01:00
<dl class="py class">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable.Iterable">
<em class="property"><span class="pre">class</span> </em><code class="sig-prename descclassname"><span class="pre">cpl_query.extension.iterable.</span></code><code class="sig-name descname"><span class="pre">Iterable</span></code><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>
2021-11-02 18:41:30 +01:00
<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">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable.Iterable.all">
<code class="sig-name descname"><span class="pre">all</span></code><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> &#x2192; <span class="pre">bool</span><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.all" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable.Iterable.any">
<code class="sig-name descname"><span class="pre">any</span></code><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> &#x2192; <span class="pre">bool</span><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.any" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable.Iterable.average">
<code class="sig-name descname"><span class="pre">average</span></code><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> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.average" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable.Iterable.contains">
<code class="sig-name descname"><span class="pre">contains</span></code><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> &#x2192; <span class="pre">bool</span><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.contains" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable.Iterable.count">
<code class="sig-name descname"><span class="pre">count</span></code><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> &#x2192; <span class="pre">int</span><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.count" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable.Iterable.distinct">
<code class="sig-name descname"><span class="pre">distinct</span></code><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> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.distinct" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable.Iterable.element_at">
<code class="sig-name descname"><span class="pre">element_at</span></code><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> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.element_at" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable.Iterable.element_at_or_default">
<code class="sig-name descname"><span class="pre">element_at_or_default</span></code><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> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.element_at_or_default" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable.Iterable.first">
<code class="sig-name descname"><span class="pre">first</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.first" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<dd><p>Returns first element</p>
<blockquote>
<div><p>First element of list: any</p>
</div></blockquote>
</dd></dl>
<dl class="py method">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable.Iterable.first_or_default">
<code class="sig-name descname"><span class="pre">first_or_default</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.first_or_default" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable.Iterable.for_each">
<code class="sig-name descname"><span class="pre">for_each</span></code><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>
2021-11-02 18:41:30 +01:00
<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">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable.Iterable.last">
<code class="sig-name descname"><span class="pre">last</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.last" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<dd><p>Returns last element</p>
<blockquote>
<div><p>Last element of list: any</p>
</div></blockquote>
</dd></dl>
<dl class="py method">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable.Iterable.last_or_default">
<code class="sig-name descname"><span class="pre">last_or_default</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.last_or_default" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable.Iterable.max">
<code class="sig-name descname"><span class="pre">max</span></code><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> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.max" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable.Iterable.min">
<code class="sig-name descname"><span class="pre">min</span></code><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> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.min" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable.Iterable.order_by">
<code class="sig-name descname"><span class="pre">order_by</span></code><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> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.order_by" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable.Iterable.order_by_descending">
<code class="sig-name descname"><span class="pre">order_by_descending</span></code><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> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.order_by_descending" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable.Iterable.reverse">
<code class="sig-name descname"><span class="pre">reverse</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.reverse" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable.Iterable.single">
<code class="sig-name descname"><span class="pre">single</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.single" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable.Iterable.single_or_default">
<code class="sig-name descname"><span class="pre">single_or_default</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.single_or_default" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable.Iterable.skip">
<code class="sig-name descname"><span class="pre">skip</span></code><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> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.skip" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable.Iterable.skip_last">
<code class="sig-name descname"><span class="pre">skip_last</span></code><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> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.skip_last" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable.Iterable.sum">
<code class="sig-name descname"><span class="pre">sum</span></code><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> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.sum" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable.Iterable.take">
<code class="sig-name descname"><span class="pre">take</span></code><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> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.take" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable.Iterable.take_last">
<code class="sig-name descname"><span class="pre">take_last</span></code><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> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.take_last" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.iterable.Iterable.where">
<code class="sig-name descname"><span class="pre">where</span></code><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> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.iterable.Iterable.where" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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>
2021-11-02 17:45:45 +01:00
</dd></dl>
2021-11-01 21:17:56 +01:00
</div>
2021-11-02 17:45:45 +01:00
<div class="section" id="module-cpl_query.extension.list">
2021-12-02 08:20:38 +01:00
<span id="cpl-query-extension-list"></span><h2>cpl_query.extension.list<a class="headerlink" href="#module-cpl_query.extension.list" title="Permalink to this headline"></a></h2>
2021-11-02 17:45:45 +01:00
<dl class="py class">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.list.List">
<em class="property"><span class="pre">class</span> </em><code class="sig-prename descclassname"><span class="pre">cpl_query.extension.list.</span></code><code class="sig-name descname"><span class="pre">List</span></code><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>
2021-11-02 18:41:30 +01:00
<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>
2021-11-02 17:45:45 +01:00
<p>Implementation of :class: <cite>cpl_query.extension.iterable.Iterable</cite></p>
</dd></dl>
2021-11-01 21:17:56 +01:00
</div>
2021-11-02 17:45:45 +01:00
<div class="section" id="module-cpl_query.extension.ordered_iterable_abc">
2021-12-02 08:20:38 +01:00
<span id="cpl-query-extension-ordered-iterable-abc"></span><h2>cpl_query.extension.ordered_iterable_abc<a class="headerlink" href="#module-cpl_query.extension.ordered_iterable_abc" title="Permalink to this headline"></a></h2>
2021-11-02 17:45:45 +01:00
<dl class="py class">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.ordered_iterable_abc.OrderedIterableABC">
<em class="property"><span class="pre">class</span> </em><code class="sig-prename descclassname"><span class="pre">cpl_query.extension.ordered_iterable_abc.</span></code><code class="sig-name descname"><span class="pre">OrderedIterableABC</span></code><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">type</span></span></em>, <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">collections.abc.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><a class="headerlink" href="#cpl_query.extension.ordered_iterable_abc.OrderedIterableABC" title="Permalink to this definition"></a></dt>
2021-11-02 17:45:45 +01:00
<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">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.ordered_iterable_abc.OrderedIterableABC.then_by">
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">then_by</span></code><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> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.ordered_iterable_abc.OrderedIterableABC.then_by" title="Permalink to this definition"></a></dt>
2021-11-02 17:45:45 +01:00
<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">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.ordered_iterable_abc.OrderedIterableABC.then_by_descending">
<em class="property"><span class="pre">abstract</span> </em><code class="sig-name descname"><span class="pre">then_by_descending</span></code><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> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.ordered_iterable_abc.OrderedIterableABC.then_by_descending" title="Permalink to this definition"></a></dt>
2021-11-02 17:45:45 +01:00
<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>
2021-11-02 18:41:30 +01:00
</div>
<div class="section" id="module-cpl_query.extension.ordered_iterable">
2021-12-02 08:20:38 +01:00
<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>
2021-11-02 18:41:30 +01:00
<dl class="py class">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.ordered_iterable.OrderedIterable">
<em class="property"><span class="pre">class</span> </em><code class="sig-prename descclassname"><span class="pre">cpl_query.extension.ordered_iterable.</span></code><code class="sig-name descname"><span class="pre">OrderedIterable</span></code><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><span class="sig-paren">)</span><a class="headerlink" href="#cpl_query.extension.ordered_iterable.OrderedIterable" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.ordered_iterable.OrderedIterable.then_by">
<code class="sig-name descname"><span class="pre">then_by</span></code><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> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.ordered_iterable.OrderedIterable.then_by" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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">
2021-12-02 08:20:38 +01:00
<dt id="cpl_query.extension.ordered_iterable.OrderedIterable.then_by_descending">
<code class="sig-name descname"><span class="pre">then_by_descending</span></code><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> &#x2192; <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><a class="headerlink" href="#cpl_query.extension.ordered_iterable.OrderedIterable.then_by_descending" title="Permalink to this definition"></a></dt>
2021-11-02 18:41:30 +01:00
<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>
2021-11-01 21:17:56 +01:00
</div>
</div>
</div>
2021-12-02 08:20:38 +01:00
2021-11-01 21:17:56 +01:00
</div>
2021-12-02 08:20:38 +01:00
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="cpl_query.exceptions.html" class="btn btn-neutral float-right" title="cpl_query.exceptions" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
2021-12-02 08:20:38 +01:00
<a href="cpl_query.html" class="btn btn-neutral float-left" title="Query Reference" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
2021-11-01 21:17:56 +01:00
</div>
<hr/>
<div role="contentinfo">
2021-12-02 08:20:38 +01:00
<p>
&#169; Copyright 2021, Sven Heidemann.
2021-12-02 08:20:38 +01:00
</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
2021-11-01 21:17:56 +01:00
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
2021-12-02 08:20:38 +01:00
provided by <a href="https://readthedocs.org">Read the Docs</a>.
2021-11-01 21:17:56 +01:00
</footer>
</div>
</div>
2021-12-02 08:20:38 +01:00
2021-11-01 21:17:56 +01:00
</section>
2021-12-02 08:20:38 +01:00
2021-11-01 21:17:56 +01:00
</div>
2021-12-02 08:20:38 +01:00
<script type="text/javascript">
2021-11-01 21:17:56 +01:00
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
2021-12-02 08:20:38 +01:00
</script>
2021-11-01 21:17:56 +01:00
</body>
</html>