You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

480 lines
21 KiB

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="ExDoc v0.23.0">
<meta name="project" content="Mirage v0.76.0">
<meta name="author" content="Inhji">
<title>Mirage.Lists — Mirage v0.76.0</title>
<link rel="stylesheet" href="dist/elixir-9f91ebe876dc01d67920.css" />
<script src="dist/sidebar_items-17f2396166.js"></script>
<script src="docs_config.js"></script>
<script async src="dist/app-60a0c9f10e9e52eae31f.js"></script>
</head>
<body data-type="modules">
<script>try { if(localStorage.getItem('night-mode') === 'true') document.body.className += ' night-mode'; } catch (e) { }</script>
<div class="main">
<button class="sidebar-button sidebar-toggle">
<span class="icon-menu" title="Collapse/expand sidebar"></span>
</button>
<section class="sidebar">
<form class="sidebar-search" action="search.html">
<button type="submit" class="search-button" aria-label="Submit Search">
<span class="icon-search" aria-hidden="true" title="Submit search"></span>
</button>
<button type="button" tabindex="-1" class="search-close-button" aria-label="Cancel Search">
<span class="icon-cross" aria-hidden="true" title="Cancel search"></span>
</button>
<label class="search-label">
<input name="q" type="text" id="search-list" class="search-input" placeholder="Search..." aria-label="Input your search terms" autocomplete="off" />
</label>
</form>
<div class="autocomplete">
<div class="autocomplete-results">
</div>
</div>
<div class="sidebar-header">
<div class="sidebar-projectDetails">
<a href="https://git.inhji.de/inhji/mirage" class="sidebar-projectName">
Mirage
</a>
<strong class="sidebar-projectVersion">
v0.76.0
</strong>
</div>
</div>
<ul class="sidebar-listNav">
<li><a id="extras-list" href="#full-list">Pages</a></li>
<li><a id="modules-list" href="#full-list">Modules</a></li>
</ul>
<div class="gradient"></div>
<ul id="full-list" class="sidebar-fullList"></ul>
</section>
<section class="content">
<div class="content-outer">
<div id="content" class="content-inner">
<h1>
Mirage.Lists <small class="app-vsn">(Mirage v0.76.0)</small>
<a href="https://git.inhji.de/inhji/mirage/src/branch/main/lib/mirage/lists.ex#L1" title="View Source" class="view-source" rel="help">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</h1>
<section id="moduledoc">
<p>The Lists context.</p>
</section>
<section id="summary" class="details-list">
<h1 class="section-heading">
<a class="hover-link" href="#summary">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this section</span>
</a>
Summary
</h1>
<div class="summary-functions summary">
<h2>
<a href="#functions">Functions</a>
</h2>
<div class="summary-row">
<div class="summary-signature">
<a href="#change_list/2">change_list(list, attrs \\ %{})</a>
</div>
<div class="summary-synopsis"><p>Returns an <code class="inline">%Ecto.Changeset{}</code> for tracking list changes.</p></div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#create_list/1">create_list(attrs \\ %{})</a>
</div>
<div class="summary-synopsis"><p>Creates a list.</p></div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#delete_list/1">delete_list(list)</a>
</div>
<div class="summary-synopsis"><p>Deletes a list.</p></div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#get_list!/1">get_list!(id)</a>
</div>
<div class="summary-synopsis"><p>Gets a single list.</p></div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#get_list_by_name/1">get_list_by_name(name)</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#list_lists/0">list_lists()</a>
</div>
<div class="summary-synopsis"><p>Returns the list of lists.</p></div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#list_preloads/0">list_preloads()</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#preload_list/1">preload_list(list_or_lists)</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#update_list/2">update_list(list, attrs)</a>
</div>
<div class="summary-synopsis"><p>Updates a list.</p></div>
</div>
</div>
</section>
<section id="functions" class="details-list">
<h1 class="section-heading">
<a class="hover-link" href="#functions">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this section</span>
</a>
Functions
</h1>
<div class="functions-list">
<section class="detail" id="change_list/2">
<span id="change_list/1"></span>
<div class="detail-header">
<a href="#change_list/2" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<h1 class="signature">change_list(list, attrs \\ %{})</h1>
<a href="https://git.inhji.de/inhji/mirage/src/branch/main/lib/mirage/lists.ex#L114" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
<p>Returns an <code class="inline">%Ecto.Changeset{}</code> for tracking list changes.</p><h2 id="change_list/2-examples" class="section-heading">
<a href="#change_list/2-examples" class="hover-link"><span class="icon-link" aria-hidden="true"></span></a>
Examples
</h2>
<pre><code class="nohighlight makeup elixir"><span class="gp unselectable">iex&gt; </span><span class="n">change_list</span><span class="p" data-group-id="4782157024-1">(</span><span class="n">list</span><span class="p" data-group-id="4782157024-1">)</span><span class="w">
</span><span class="p" data-group-id="4782157024-2">%</span><span class="nc" data-group-id="4782157024-2">Ecto.Changeset</span><span class="p" data-group-id="4782157024-2">{</span><span class="ss">data</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="4782157024-3">%</span><span class="nc" data-group-id="4782157024-3">List</span><span class="p" data-group-id="4782157024-3">{</span><span class="p" data-group-id="4782157024-3">}</span><span class="p" data-group-id="4782157024-2">}</span></code></pre>
</section>
</section>
<section class="detail" id="create_list/1">
<span id="create_list/0"></span>
<div class="detail-header">
<a href="#create_list/1" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<h1 class="signature">create_list(attrs \\ %{})</h1>
<a href="https://git.inhji.de/inhji/mirage/src/branch/main/lib/mirage/lists.ex#L65" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
<p>Creates a list.</p><h2 id="create_list/1-examples" class="section-heading">
<a href="#create_list/1-examples" class="hover-link"><span class="icon-link" aria-hidden="true"></span></a>
Examples
</h2>
<pre><code class="nohighlight makeup elixir"><span class="gp unselectable">iex&gt; </span><span class="n">create_list</span><span class="p" data-group-id="0368344269-1">(</span><span class="p" data-group-id="0368344269-2">%{</span><span class="ss">field</span><span class="p">:</span><span class="w"> </span><span class="n">value</span><span class="p" data-group-id="0368344269-2">}</span><span class="p" data-group-id="0368344269-1">)</span><span class="w">
</span><span class="p" data-group-id="0368344269-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0368344269-4">%</span><span class="nc" data-group-id="0368344269-4">List</span><span class="p" data-group-id="0368344269-4">{</span><span class="p" data-group-id="0368344269-4">}</span><span class="p" data-group-id="0368344269-3">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="n">create_list</span><span class="p" data-group-id="0368344269-5">(</span><span class="p" data-group-id="0368344269-6">%{</span><span class="ss">field</span><span class="p">:</span><span class="w"> </span><span class="n">bad_value</span><span class="p" data-group-id="0368344269-6">}</span><span class="p" data-group-id="0368344269-5">)</span><span class="w">
</span><span class="p" data-group-id="0368344269-7">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0368344269-8">%</span><span class="nc" data-group-id="0368344269-8">Ecto.Changeset</span><span class="p" data-group-id="0368344269-8">{</span><span class="p" data-group-id="0368344269-8">}</span><span class="p" data-group-id="0368344269-7">}</span></code></pre>
</section>
</section>
<section class="detail" id="delete_list/1">
<div class="detail-header">
<a href="#delete_list/1" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<h1 class="signature">delete_list(list)</h1>
<a href="https://git.inhji.de/inhji/mirage/src/branch/main/lib/mirage/lists.ex#L101" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
<p>Deletes a list.</p><h2 id="delete_list/1-examples" class="section-heading">
<a href="#delete_list/1-examples" class="hover-link"><span class="icon-link" aria-hidden="true"></span></a>
Examples
</h2>
<pre><code class="nohighlight makeup elixir"><span class="gp unselectable">iex&gt; </span><span class="n">delete_list</span><span class="p" data-group-id="9996692278-1">(</span><span class="n">list</span><span class="p" data-group-id="9996692278-1">)</span><span class="w">
</span><span class="p" data-group-id="9996692278-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9996692278-3">%</span><span class="nc" data-group-id="9996692278-3">List</span><span class="p" data-group-id="9996692278-3">{</span><span class="p" data-group-id="9996692278-3">}</span><span class="p" data-group-id="9996692278-2">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="n">delete_list</span><span class="p" data-group-id="9996692278-4">(</span><span class="n">list</span><span class="p" data-group-id="9996692278-4">)</span><span class="w">
</span><span class="p" data-group-id="9996692278-5">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9996692278-6">%</span><span class="nc" data-group-id="9996692278-6">Ecto.Changeset</span><span class="p" data-group-id="9996692278-6">{</span><span class="p" data-group-id="9996692278-6">}</span><span class="p" data-group-id="9996692278-5">}</span></code></pre>
</section>
</section>
<section class="detail" id="get_list!/1">
<div class="detail-header">
<a href="#get_list!/1" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<h1 class="signature">get_list!(id)</h1>
<a href="https://git.inhji.de/inhji/mirage/src/branch/main/lib/mirage/lists.ex#L45" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
<p>Gets a single list.</p><p>Raises <a href="https://hexdocs.pm/ecto/3.5.8/Ecto.NoResultsError.html"><code class="inline">Ecto.NoResultsError</code></a> if the List does not exist.</p><h2 id="get_list!/1-examples" class="section-heading">
<a href="#get_list!/1-examples" class="hover-link"><span class="icon-link" aria-hidden="true"></span></a>
Examples
</h2>
<pre><code class="nohighlight makeup elixir"><span class="gp unselectable">iex&gt; </span><span class="n">get_list!</span><span class="p" data-group-id="3469195967-1">(</span><span class="mi">123</span><span class="p" data-group-id="3469195967-1">)</span><span class="w">
</span><span class="p" data-group-id="3469195967-2">%</span><span class="nc" data-group-id="3469195967-2">List</span><span class="p" data-group-id="3469195967-2">{</span><span class="p" data-group-id="3469195967-2">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="n">get_list!</span><span class="p" data-group-id="3469195967-3">(</span><span class="mi">456</span><span class="p" data-group-id="3469195967-3">)</span><span class="w">
</span><span class="gt">** (Ecto.NoResultsError)</span></code></pre>
</section>
</section>
<section class="detail" id="get_list_by_name/1">
<div class="detail-header">
<a href="#get_list_by_name/1" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<h1 class="signature">get_list_by_name(name)</h1>
<a href="https://git.inhji.de/inhji/mirage/src/branch/main/lib/mirage/lists.ex#L47" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</section>
<section class="detail" id="list_lists/0">
<div class="detail-header">
<a href="#list_lists/0" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<h1 class="signature">list_lists()</h1>
<a href="https://git.inhji.de/inhji/mirage/src/branch/main/lib/mirage/lists.ex#L25" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
<p>Returns the list of lists.</p><h2 id="list_lists/0-examples" class="section-heading">
<a href="#list_lists/0-examples" class="hover-link"><span class="icon-link" aria-hidden="true"></span></a>
Examples
</h2>
<pre><code class="nohighlight makeup elixir"><span class="gp unselectable">iex&gt; </span><span class="n">list_lists</span><span class="p" data-group-id="2697109780-1">(</span><span class="p" data-group-id="2697109780-1">)</span><span class="w">
</span><span class="p" data-group-id="2697109780-2">[</span><span class="p" data-group-id="2697109780-3">%</span><span class="nc" data-group-id="2697109780-3">List</span><span class="p" data-group-id="2697109780-3">{</span><span class="p" data-group-id="2697109780-3">}</span><span class="p">,</span><span class="w"> </span><span class="n">...</span><span class="p" data-group-id="2697109780-2">]</span></code></pre>
</section>
</section>
<section class="detail" id="list_preloads/0">
<div class="detail-header">
<a href="#list_preloads/0" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<h1 class="signature">list_preloads()</h1>
<a href="https://git.inhji.de/inhji/mirage/src/branch/main/lib/mirage/lists.ex#L11" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</section>
<section class="detail" id="preload_list/1">
<div class="detail-header">
<a href="#preload_list/1" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<h1 class="signature">preload_list(list_or_lists)</h1>
<a href="https://git.inhji.de/inhji/mirage/src/branch/main/lib/mirage/lists.ex#L49" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</section>
<section class="detail" id="update_list/2">
<div class="detail-header">
<a href="#update_list/2" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<h1 class="signature">update_list(list, attrs)</h1>
<a href="https://git.inhji.de/inhji/mirage/src/branch/main/lib/mirage/lists.ex#L83" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
<p>Updates a list.</p><h2 id="update_list/2-examples" class="section-heading">
<a href="#update_list/2-examples" class="hover-link"><span class="icon-link" aria-hidden="true"></span></a>
Examples
</h2>
<pre><code class="nohighlight makeup elixir"><span class="gp unselectable">iex&gt; </span><span class="n">update_list</span><span class="p" data-group-id="5989647966-1">(</span><span class="n">list</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5989647966-2">%{</span><span class="ss">field</span><span class="p">:</span><span class="w"> </span><span class="n">new_value</span><span class="p" data-group-id="5989647966-2">}</span><span class="p" data-group-id="5989647966-1">)</span><span class="w">
</span><span class="p" data-group-id="5989647966-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5989647966-4">%</span><span class="nc" data-group-id="5989647966-4">List</span><span class="p" data-group-id="5989647966-4">{</span><span class="p" data-group-id="5989647966-4">}</span><span class="p" data-group-id="5989647966-3">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="n">update_list</span><span class="p" data-group-id="5989647966-5">(</span><span class="n">list</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5989647966-6">%{</span><span class="ss">field</span><span class="p">:</span><span class="w"> </span><span class="n">bad_value</span><span class="p" data-group-id="5989647966-6">}</span><span class="p" data-group-id="5989647966-5">)</span><span class="w">
</span><span class="p" data-group-id="5989647966-7">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5989647966-8">%</span><span class="nc" data-group-id="5989647966-8">Ecto.Changeset</span><span class="p" data-group-id="5989647966-8">{</span><span class="p" data-group-id="5989647966-8">}</span><span class="p" data-group-id="5989647966-7">}</span></code></pre>
</section>
</section>
</div>
</section>
<footer class="footer">
<p>
<span class="line">
Built using
<a href="https://github.com/elixir-lang/ex_doc" title="ExDoc" target="_blank" rel="help noopener">ExDoc</a> (v0.23.0) for the
<a href="https://elixir-lang.org" title="Elixir" target="_blank">Elixir programming language</a>.
</span>
<span class="line">
Designed by
<a href="https://twitter.com/dignifiedquire" target="_blank" rel="noopener" title="@dignifiedquire">Friedel Ziegelmayer</a>.
</span>
</p>
<p>
<a href="api-reference.html" title="API reference" class="line footer-button">API Reference</a>
<button class="line footer-button display-shortcuts-help">
Display keyboard shortcuts
</button>
<button class="line footer-button night-mode-toggle">
Toggle night mode
</button>
<button class="line footer-button display-quick-switch">
Go to a HexDocs package
</button>
<button class="line footer-button tooltips-toggle">
<span class="tooltips-option-disable">Disable tooltips</span>
<span class="tooltips-option-enable">Enable tooltips</span>
</button>
</p>
</footer>
</div>
</div>
</section>
</div>
</body>
</html>