Current section
Files
Jump to
Current section
Files
doc/Entity.Association.html
<!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.29.4">
<meta name="project" content="entity v0.1.1">
<title>Entity.Association — entity v0.1.1</title>
<link rel="stylesheet" href="dist/html-elixir-HHVY3JYD.css" />
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-11B9BF61.js"></script>
<script src="docs_config.js"></script>
<script async src="dist/html-JDI3AVDD.js"></script>
</head>
<body data-type="modules" class="page-module">
<script>
try {
var settings = JSON.parse(localStorage.getItem('ex_doc:settings') || '{}');
if (settings.theme === 'dark' ||
((settings.theme === 'system' || settings.theme == null) &&
window.matchMedia('(prefers-color-scheme: dark)').matches)
) {
document.body.classList.add('dark')
}
} catch (error) { }
</script>
<div class="main">
<button class="sidebar-button sidebar-toggle" aria-label="toggle sidebar">
<i class="ri-menu-line ri-lg" title="Collapse/expand sidebar"></i>
</button>
<section class="sidebar">
<form class="sidebar-search" action="search.html">
<button type="submit" class="search-button" aria-label="Submit Search">
<i class="ri-search-2-line" aria-hidden="true" title="Submit search"></i>
</button>
<button type="button" tabindex="-1" class="search-close-button" aria-label="Cancel Search">
<i class="ri-close-line ri-lg" aria-hidden="true" title="Cancel search"></i>
</button>
<label class="search-label">
<p class="sr-only">Search</p>
<input name="q" type="text" class="search-input" placeholder="Search..." aria-label="Input your search terms" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" />
</label>
</form>
<div class="autocomplete">
<div class="autocomplete-results">
</div>
</div>
<div class="sidebar-header">
<div class="sidebar-projectDetails">
<a href="readme.html" class="sidebar-projectName" translate="no">
entity
</a>
<div class="sidebar-projectVersion" translate="no">
v0.1.1
</div>
</div>
<ul class="sidebar-listNav">
<li><a id="extras-list-link" href="#full-list">Pages</a></li>
<li><a id="modules-list-link" href="#full-list">Modules</a></li>
</ul>
</div>
<div class="gradient"></div>
<ul id="full-list"></ul>
</section>
<section class="content">
<output role="status" id="toast"></output>
<div class="content-outer">
<div id="content" class="content-inner">
<h1>
<button class="icon-action display-settings">
<i class="ri-settings-3-line"></i>
<span class="sr-only">Settings</span>
</button>
<a href="https://github.com/kamaroly/ecto_entity/blob/main/lib/entity/association.ex#L1" title="View Source" class="icon-action" rel="help">
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
<span class="sr-only">View Source</span>
</a>
<span translate="no">Entity.Association</span>
<small class="app-vsn" translate="no">(entity v0.1.1)</small>
</h1>
<section id="summary" class="details-list">
<h1 class="section-heading">
<a class="hover-link" href="#summary">
<i class="ri-link-m" aria-hidden="true"></i>
<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="#all/0" translate="no">all()</a>
</div>
<div class="summary-synopsis"><p>Retrieves all database entries from a schema module</p></div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#all/1" translate="no">all(query)</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#count/0" translate="no">count()</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#count/1" translate="no">count(query)</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#find/1" translate="no">find(id)</a>
</div>
<div class="summary-synopsis"><p>Finds the a database entry from a schema module</p></div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#find!/1" translate="no">find!(id)</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#first/0" translate="no">first()</a>
</div>
<div class="summary-synopsis"><p>Retrieves the first database entry from a schema module</p></div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#first!/0" translate="no">first!()</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#first!/1" translate="no">first!(query)</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#get/0" translate="no">get()</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#get/1" translate="no">get(query)</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#last/0" translate="no">last()</a>
</div>
<div class="summary-synopsis"><p>Retrieves the last database entry from a schema module</p></div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#oder_by/0" translate="no">oder_by()</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#oder_by/1" translate="no">oder_by(column)</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#size/0" translate="no">size()</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#size/1" translate="no">size(query)</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#take/1" translate="no">take(number)</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#take/2" translate="no">take(query, number)</a>
</div>
</div>
</div>
</section>
<section id="functions" class="details-list">
<h1 class="section-heading">
<a class="hover-link" href="#functions">
<i class="ri-link-m" aria-hidden="true"></i>
<span class="sr-only">Link to this section</span>
</a>
Functions
</h1>
<div class="functions-list">
<section class="detail" id="all/0">
<div class="detail-header">
<a href="#all/0" class="detail-link" title="Link to this function">
<i class="ri-link-m" aria-hidden="true"></i>
<span class="sr-only">Link to this function</span>
</a>
<h1 class="signature" translate="no">all()</h1>
<a href="https://github.com/kamaroly/ecto_entity/blob/main/lib/entity/association.ex#L3" class="icon-action" rel="help" title="View Source">
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
<p>Retrieves all database entries from a schema module</p><h2 id="all/0-examples" class="section-heading">
<a href="#all/0-examples" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">examples</p>
</a>
Examples
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">SchemaModule</span><span class="o">.</span><span class="n">all</span><span class="p" data-group-id="6125145877-1">(</span><span class="p" data-group-id="6125145877-1">)</span><span class="w">
</span><span class="p" data-group-id="6125145877-2">[</span><span class="p" data-group-id="6125145877-3">%</span><span class="nc" data-group-id="6125145877-3">SchemaModule</span><span class="p" data-group-id="6125145877-3">{</span><span class="p" data-group-id="6125145877-3">}</span><span class="p" data-group-id="6125145877-2">]</span><span class="w">
</span><span class="gp unselectable">iex> </span><span class="nc">SchemaModule</span><span class="o">.</span><span class="n">all</span><span class="p" data-group-id="6125145877-4">(</span><span class="n">query</span><span class="p" data-group-id="6125145877-4">)</span><span class="w">
</span><span class="p" data-group-id="6125145877-5">[</span><span class="p" data-group-id="6125145877-6">%</span><span class="nc" data-group-id="6125145877-6">SchemaModule</span><span class="p" data-group-id="6125145877-6">{</span><span class="p" data-group-id="6125145877-6">}</span><span class="p" data-group-id="6125145877-5">]</span></code></pre>
</section>
</section>
<section class="detail" id="all/1">
<div class="detail-header">
<a href="#all/1" class="detail-link" title="Link to this function">
<i class="ri-link-m" aria-hidden="true"></i>
<span class="sr-only">Link to this function</span>
</a>
<h1 class="signature" translate="no">all(query)</h1>
<a href="https://github.com/kamaroly/ecto_entity/blob/main/lib/entity/association.ex#L3" class="icon-action" rel="help" title="View Source">
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</section>
<section class="detail" id="count/0">
<div class="detail-header">
<a href="#count/0" class="detail-link" title="Link to this function">
<i class="ri-link-m" aria-hidden="true"></i>
<span class="sr-only">Link to this function</span>
</a>
<h1 class="signature" translate="no">count()</h1>
<a href="https://github.com/kamaroly/ecto_entity/blob/main/lib/entity/association.ex#L3" class="icon-action" rel="help" title="View Source">
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</section>
<section class="detail" id="count/1">
<div class="detail-header">
<a href="#count/1" class="detail-link" title="Link to this function">
<i class="ri-link-m" aria-hidden="true"></i>
<span class="sr-only">Link to this function</span>
</a>
<h1 class="signature" translate="no">count(query)</h1>
<a href="https://github.com/kamaroly/ecto_entity/blob/main/lib/entity/association.ex#L3" class="icon-action" rel="help" title="View Source">
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</section>
<section class="detail" id="find/1">
<div class="detail-header">
<a href="#find/1" class="detail-link" title="Link to this function">
<i class="ri-link-m" aria-hidden="true"></i>
<span class="sr-only">Link to this function</span>
</a>
<h1 class="signature" translate="no">find(id)</h1>
<a href="https://github.com/kamaroly/ecto_entity/blob/main/lib/entity/association.ex#L3" class="icon-action" rel="help" title="View Source">
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
<p>Finds the a database entry from a schema module</p><h2 id="find/1-examples" class="section-heading">
<a href="#find/1-examples" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">examples</p>
</a>
Examples
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">SchemaModule</span><span class="o">.</span><span class="n">find</span><span class="p" data-group-id="3717430057-1">(</span><span class="n">id</span><span class="p" data-group-id="3717430057-1">)</span><span class="w">
</span><span class="p" data-group-id="3717430057-2">%</span><span class="nc" data-group-id="3717430057-2">SchemaModule</span><span class="p" data-group-id="3717430057-2">{</span><span class="p" data-group-id="3717430057-2">}</span><span class="w">
</span><span class="gp unselectable">iex> </span><span class="nc">SchemaModule</span><span class="o">.</span><span class="n">find!</span><span class="p" data-group-id="3717430057-3">(</span><span class="n">id</span><span class="p" data-group-id="3717430057-3">)</span><span class="w">
</span><span class="p" data-group-id="3717430057-4">%</span><span class="nc" data-group-id="3717430057-4">SchemaModule</span><span class="p" data-group-id="3717430057-4">{</span><span class="p" data-group-id="3717430057-4">}</span></code></pre>
</section>
</section>
<section class="detail" id="find!/1">
<div class="detail-header">
<a href="#find!/1" class="detail-link" title="Link to this function">
<i class="ri-link-m" aria-hidden="true"></i>
<span class="sr-only">Link to this function</span>
</a>
<h1 class="signature" translate="no">find!(id)</h1>
<a href="https://github.com/kamaroly/ecto_entity/blob/main/lib/entity/association.ex#L3" class="icon-action" rel="help" title="View Source">
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</section>
<section class="detail" id="first/0">
<div class="detail-header">
<a href="#first/0" class="detail-link" title="Link to this function">
<i class="ri-link-m" aria-hidden="true"></i>
<span class="sr-only">Link to this function</span>
</a>
<h1 class="signature" translate="no">first()</h1>
<a href="https://github.com/kamaroly/ecto_entity/blob/main/lib/entity/association.ex#L3" class="icon-action" rel="help" title="View Source">
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
<p>Retrieves the first database entry from a schema module</p><h2 id="first/0-examples" class="section-heading">
<a href="#first/0-examples" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">examples</p>
</a>
Examples
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">SchemaModule</span><span class="o">.</span><span class="n">first</span><span class="p" data-group-id="6269534558-1">(</span><span class="p" data-group-id="6269534558-1">)</span><span class="w">
</span><span class="p" data-group-id="6269534558-2">%</span><span class="nc" data-group-id="6269534558-2">SchemaModule</span><span class="p" data-group-id="6269534558-2">{</span><span class="p" data-group-id="6269534558-2">}</span><span class="w">
</span><span class="gp unselectable">iex> </span><span class="nc">SchemaModule</span><span class="o">.</span><span class="n">first</span><span class="p" data-group-id="6269534558-3">(</span><span class="n">query</span><span class="p" data-group-id="6269534558-3">)</span><span class="w">
</span><span class="p" data-group-id="6269534558-4">%</span><span class="nc" data-group-id="6269534558-4">SchemaModule</span><span class="p" data-group-id="6269534558-4">{</span><span class="p" data-group-id="6269534558-4">}</span></code></pre>
</section>
</section>
<section class="detail" id="first!/0">
<div class="detail-header">
<a href="#first!/0" class="detail-link" title="Link to this function">
<i class="ri-link-m" aria-hidden="true"></i>
<span class="sr-only">Link to this function</span>
</a>
<h1 class="signature" translate="no">first!()</h1>
<a href="https://github.com/kamaroly/ecto_entity/blob/main/lib/entity/association.ex#L3" class="icon-action" rel="help" title="View Source">
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</section>
<section class="detail" id="first!/1">
<div class="detail-header">
<a href="#first!/1" class="detail-link" title="Link to this function">
<i class="ri-link-m" aria-hidden="true"></i>
<span class="sr-only">Link to this function</span>
</a>
<h1 class="signature" translate="no">first!(query)</h1>
<a href="https://github.com/kamaroly/ecto_entity/blob/main/lib/entity/association.ex#L3" class="icon-action" rel="help" title="View Source">
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</section>
<section class="detail" id="get/0">
<div class="detail-header">
<a href="#get/0" class="detail-link" title="Link to this function">
<i class="ri-link-m" aria-hidden="true"></i>
<span class="sr-only">Link to this function</span>
</a>
<h1 class="signature" translate="no">get()</h1>
<a href="https://github.com/kamaroly/ecto_entity/blob/main/lib/entity/association.ex#L3" class="icon-action" rel="help" title="View Source">
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</section>
<section class="detail" id="get/1">
<div class="detail-header">
<a href="#get/1" class="detail-link" title="Link to this function">
<i class="ri-link-m" aria-hidden="true"></i>
<span class="sr-only">Link to this function</span>
</a>
<h1 class="signature" translate="no">get(query)</h1>
<a href="https://github.com/kamaroly/ecto_entity/blob/main/lib/entity/association.ex#L3" class="icon-action" rel="help" title="View Source">
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</section>
<section class="detail" id="last/0">
<div class="detail-header">
<a href="#last/0" class="detail-link" title="Link to this function">
<i class="ri-link-m" aria-hidden="true"></i>
<span class="sr-only">Link to this function</span>
</a>
<h1 class="signature" translate="no">last()</h1>
<a href="https://github.com/kamaroly/ecto_entity/blob/main/lib/entity/association.ex#L3" class="icon-action" rel="help" title="View Source">
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
<p>Retrieves the last database entry from a schema module</p><h2 id="last/0-examples" class="section-heading">
<a href="#last/0-examples" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">examples</p>
</a>
Examples
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">SchemaModule</span><span class="o">.</span><span class="n">last</span><span class="p" data-group-id="5350072677-1">(</span><span class="p" data-group-id="5350072677-1">)</span><span class="w">
</span><span class="p" data-group-id="5350072677-2">%</span><span class="nc" data-group-id="5350072677-2">SchemaModule</span><span class="p" data-group-id="5350072677-2">{</span><span class="p" data-group-id="5350072677-2">}</span><span class="w">
</span><span class="gp unselectable">iex> </span><span class="nc">SchemaModule</span><span class="o">.</span><span class="n">last</span><span class="p" data-group-id="5350072677-3">(</span><span class="n">query</span><span class="p" data-group-id="5350072677-3">)</span><span class="w">
</span><span class="p" data-group-id="5350072677-4">%</span><span class="nc" data-group-id="5350072677-4">SchemaModule</span><span class="p" data-group-id="5350072677-4">{</span><span class="p" data-group-id="5350072677-4">}</span></code></pre>
</section>
</section>
<section class="detail" id="oder_by/0">
<div class="detail-header">
<a href="#oder_by/0" class="detail-link" title="Link to this function">
<i class="ri-link-m" aria-hidden="true"></i>
<span class="sr-only">Link to this function</span>
</a>
<h1 class="signature" translate="no">oder_by()</h1>
<a href="https://github.com/kamaroly/ecto_entity/blob/main/lib/entity/association.ex#L3" class="icon-action" rel="help" title="View Source">
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</section>
<section class="detail" id="oder_by/1">
<div class="detail-header">
<a href="#oder_by/1" class="detail-link" title="Link to this function">
<i class="ri-link-m" aria-hidden="true"></i>
<span class="sr-only">Link to this function</span>
</a>
<h1 class="signature" translate="no">oder_by(column)</h1>
<a href="https://github.com/kamaroly/ecto_entity/blob/main/lib/entity/association.ex#L3" class="icon-action" rel="help" title="View Source">
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</section>
<section class="detail" id="size/0">
<div class="detail-header">
<a href="#size/0" class="detail-link" title="Link to this function">
<i class="ri-link-m" aria-hidden="true"></i>
<span class="sr-only">Link to this function</span>
</a>
<h1 class="signature" translate="no">size()</h1>
<a href="https://github.com/kamaroly/ecto_entity/blob/main/lib/entity/association.ex#L3" class="icon-action" rel="help" title="View Source">
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</section>
<section class="detail" id="size/1">
<div class="detail-header">
<a href="#size/1" class="detail-link" title="Link to this function">
<i class="ri-link-m" aria-hidden="true"></i>
<span class="sr-only">Link to this function</span>
</a>
<h1 class="signature" translate="no">size(query)</h1>
<a href="https://github.com/kamaroly/ecto_entity/blob/main/lib/entity/association.ex#L3" class="icon-action" rel="help" title="View Source">
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</section>
<section class="detail" id="take/1">
<div class="detail-header">
<a href="#take/1" class="detail-link" title="Link to this function">
<i class="ri-link-m" aria-hidden="true"></i>
<span class="sr-only">Link to this function</span>
</a>
<h1 class="signature" translate="no">take(number)</h1>
<a href="https://github.com/kamaroly/ecto_entity/blob/main/lib/entity/association.ex#L3" class="icon-action" rel="help" title="View Source">
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</section>
<section class="detail" id="take/2">
<div class="detail-header">
<a href="#take/2" class="detail-link" title="Link to this function">
<i class="ri-link-m" aria-hidden="true"></i>
<span class="sr-only">Link to this function</span>
</a>
<h1 class="signature" translate="no">take(query, number)</h1>
<a href="https://github.com/kamaroly/ecto_entity/blob/main/lib/entity/association.ex#L3" class="icon-action" rel="help" title="View Source">
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</section>
</div>
</section>
<footer class="footer">
<p>
<span class="line">
<a href="https://hex.pm/packages/entity/0.1.1" class="footer-hex-package">Hex Package</a>
<a href="https://preview.hex.pm/preview/entity/0.1.1">Hex Preview</a>
(<a href="https://preview.hex.pm/preview/entity/0.1.1/show/lib/entity/association.ex">current file</a>)
</span>
<span class="line">
<button class="a-main footer-button display-quick-switch" title="Search HexDocs packages">
Search HexDocs
</button>
<a href="entity.epub" title="ePub version">
Download ePub version
</a>
</span>
</p>
<p class="built-using">
Built using
<a href="https://github.com/elixir-lang/ex_doc" title="ExDoc" target="_blank" rel="help noopener" translate="no">ExDoc</a> (v0.29.4) for the
<a href="https://elixir-lang.org" title="Elixir" target="_blank" translate="no">Elixir programming language</a>
</p>
</footer>
</div>
</div>
</section>
</div>
</body>
</html>