hachyderm.io is one of the many independent Mastodon servers you can use to participate in the fediverse.
Hachyderm is a safe space, LGBTQIA+ and BLM, primarily comprised of tech industry professionals world wide. Note that many non-user account types have restrictions - please see our About page.

Administered by:

Server stats:

9K
active users

#ecto

1 post1 participant0 posts today
Ein Philosophiker<p><span class="h-card" translate="no"><a href="https://genserver.social/users/ThinkingElixir" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>ThinkingElixir</span></a></span> I urgently need stickers! <a href="https://social.saarland/tags/Elixir" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Elixir</span></a> <a href="https://social.saarland/tags/Phoenix" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Phoenix</span></a> <a href="https://social.saarland/tags/Ecto" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Ecto</span></a> at least</p>
Ein Philosophiker<p>Rebuilding everything in order to apply a migration to a database is so '90s when you already have <a href="https://social.saarland/tags/Ecto" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Ecto</span></a> in mind... 🙄 <br><a href="https://social.saarland/tags/Microsoft" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Microsoft</span></a> <a href="https://social.saarland/tags/EfCore" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>EfCore</span></a></p>
T0ha<p>Ecto’s fragments still feel like Elixir</p><p>But what I also really love is that if I want to eject out and write plain SQL for a specific part, it still feels like Elixir, because everything else stays the same—it’s just a tiny fragment/1 that uses safe variable interpolation. And it turns out that Ecto.</p><p>Tags: <a href="https://mastodon.social/tags/ecto" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ecto</span></a>, <a href="https://mastodon.social/tags/elixir" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>elixir</span></a>, <a href="https://mastodon.social/tags/sql" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>sql</span></a></p><p>via Pocket <a href="https://ift.tt/BVUuop1" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">ift.tt/BVUuop1</span><span class="invisible"></span></a></p><p>February 17, 2025 at 06:25PM</p>
T0ha<p>Optimizing batch operations with Ecto</p><p>We had a feature in a product that required us to insert and update lots of data on a user action. Here is how we transformed 1000 SQL queries into 1. The way the code is structured is simple: An operations table and a translations table.</p><p>Tags: <a href="https://mastodon.social/tags/ecto" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ecto</span></a>, <a href="https://mastodon.social/tags/elixir" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>elixir</span></a></p><p>via Pocket <a href="https://ift.tt/DeLJXAa" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">ift.tt/DeLJXAa</span><span class="invisible"></span></a></p><p>February 11, 2025 at 11:42AM</p>
T0ha<p>Ecto Datetime With Time Zone</p><p>While implementing a feature to store event dates, I stumbled upon what I initially thought was a straightforward task: saving future dates in a database along with their time zones. How hard could it be, right? Turns out, it’s not so simple.</p><p>Tags: <a href="https://mastodon.social/tags/ecto" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ecto</span></a>, <a href="https://mastodon.social/tags/elixir" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>elixir</span></a>, <a href="https://mastodon.social/tags/elixirlang" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>elixirlang</span></a></p><p>via Pocket <a href="https://ift.tt/THrBwKm" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">ift.tt/THrBwKm</span><span class="invisible"></span></a></p><p>February 03, 2025 at 05:07PM</p>
T0ha<p>Search Filters with Ecto Queries</p><p>We have also written an accompanying Livebook for this article that includes the final code for you to play around with.</p><p>Tags: <a href="https://mastodon.social/tags/ecto" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ecto</span></a>, <a href="https://mastodon.social/tags/elixir" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>elixir</span></a>, <a href="https://mastodon.social/tags/liveview" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>liveview</span></a>, <a href="https://mastodon.social/tags/myelixirstatus" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>myelixirstatus</span></a>, <a href="https://mastodon.social/tags/phoenix" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>phoenix</span></a></p><p>via Pocket <a href="https://ift.tt/NR2p0El" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">ift.tt/NR2p0El</span><span class="invisible"></span></a></p><p>January 30, 2025 at 11:15AM</p>
Maikel<p>Latest and greatest episode about Schemas in Ecto <a href="https://www.twitch.tv/videos/2329133372" rel="nofollow noopener noreferrer" target="_blank">here</a><span><br><br>and the updated summary </span><a href="https://notes.maikel.dev/Learning/Book+Summaries/Programming+Ecto+by+Darrin+and+Eric" rel="nofollow noopener noreferrer" target="_blank">here</a><span><br><br>I'm using Sharkey for this toot because it has </span><b>markdown</b><span>, we're not savages this side of the fedi. <br><br></span><a href="https://blahaj.zone/tags/Ecto" rel="nofollow noopener noreferrer" target="_blank">#Ecto</a> <a href="https://blahaj.zone/tags/Elixir" rel="nofollow noopener noreferrer" target="_blank">#Elixir</a> <a href="https://blahaj.zone/tags/Schemas" rel="nofollow noopener noreferrer" target="_blank">#Schemas</a></p>
Sen<p>And this!</p><p><a href="https://www.youtube.com/watch?v=tmInKl7-6DM" target="_blank" rel="nofollow noopener noreferrer" translate="no"><span class="invisible">https://www.</span><span class="ellipsis">youtube.com/watch?v=tmInKl7-6D</span><span class="invisible">M</span></a></p><p><a href="https://hachyderm.io/tags/Elixir" class="mention hashtag" rel="tag">#<span>Elixir</span></a> <a href="https://hachyderm.io/tags/Ecto" class="mention hashtag" rel="tag">#<span>Ecto</span></a></p>
Sen<p>I really wish I had these steps when I was getting started with <a href="https://hachyderm.io/tags/Ecto" class="mention hashtag" rel="tag">#<span>Ecto</span></a> and wanted to use <a href="https://hachyderm.io/tags/SQLite" class="mention hashtag" rel="tag">#<span>SQLite</span></a> in an <a href="https://hachyderm.io/tags/Elixir" class="mention hashtag" rel="tag">#<span>Elixir</span></a> project.</p><p><a href="https://sensen.dev/posts/create-new-elixir-project-with-ecto-and-sqlite/" target="_blank" rel="nofollow noopener noreferrer" translate="no"><span class="invisible">https://</span><span class="ellipsis">sensen.dev/posts/create-new-el</span><span class="invisible">ixir-project-with-ecto-and-sqlite/</span></a></p>
Peter Solnica<p>Sentry tracing for Elixir/Phoenix/Ecto update:</p><p>✅ Live view traces<br />✅ Ecto db statements in traces</p><p>Getting there!</p><p><a href="https://hachyderm.io/tags/MyElixirStatus" class="mention hashtag" rel="tag">#<span>MyElixirStatus</span></a> <a href="https://hachyderm.io/tags/observability" class="mention hashtag" rel="tag">#<span>observability</span></a> <a href="https://hachyderm.io/tags/phoenixframework" class="mention hashtag" rel="tag">#<span>phoenixframework</span></a> <a href="https://hachyderm.io/tags/ecto" class="mention hashtag" rel="tag">#<span>ecto</span></a> <a href="https://hachyderm.io/tags/elixir" class="mention hashtag" rel="tag">#<span>elixir</span></a></p>
Bonfire<p>Needle also comes with two other homegrown libraries: needle_ulid which provides a ULID datatype for Ecto (using ex_ulid) and related helpers, and exto which enables extending Ecto schema definitions in config (especially useful for adding Mixin associations to different schemas)…<br>---<br>📣 🏴‍☠️ Camp! expedition: We have some&nbsp;open bounties&nbsp;to improve bonfire performance :<br>Read more: <a href="https://indieweb.social/@bonfire/112943944096656953" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">indieweb.social/@bonfire/11294</span><span class="invisible">3944096656953</span></a><br>Repository: <a href="https://github.com/bonfire-networks/bounties" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/bonfire-networks/bo</span><span class="invisible">unties</span></a><br><a href="https://indieweb.social/tags/ecto" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ecto</span></a> <a href="https://indieweb.social/tags/myElixirStatus" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>myElixirStatus</span></a> <a href="https://indieweb.social/tags/elixir" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>elixir</span></a><br>6/6</p>
Bonfire<p>Besides regular schemas with universal foreign keys (Pointable), Needle provides Virtual for schemas that don’t have any fields on their own, and Mixin for storing common fields that can be re-used by multiple Pointables or Virtuals (eg. if you have multiple types that all have a name/description/body, they can share those and optionally the associated changesets and other logic).</p><p><a href="https://indieweb.social/tags/ecto" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ecto</span></a> <a href="https://indieweb.social/tags/myElixirStatus" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>myElixirStatus</span></a> <a href="https://indieweb.social/tags/elixir" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>elixir</span></a></p><p>5/6</p>
Bonfire<p>But what if you don’t just have posts that can be liked, but also videos, images, polls, etc, each with their own table, but probably do not want to have to add liked_video_id, liked_image_id, ad infinitum?</p><p>We needed the flexibility to have a foreign key that can reference any referenceable object. We call our system Needle.</p><p><a href="https://indieweb.social/tags/ecto" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ecto</span></a> <a href="https://indieweb.social/tags/myElixirStatus" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>myElixirStatus</span></a> <a href="https://indieweb.social/tags/elixir" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>elixir</span></a><br>4/6</p>
Bonfire<p>A simple example would be a blogging app, which might have a post table with author field that references the user table.</p><p>A social network, by contrast, usually requires a graph of objects, meaning objects need to be able to refer to other objects by their ID without knowing their type.</p><p>A simple example would be likes, you might have a likes table with liked_post_id field that references the post table.</p><p><a href="https://indieweb.social/tags/ecto" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ecto</span></a> <a href="https://indieweb.social/tags/myElixirStatus" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>myElixirStatus</span></a> <a href="https://indieweb.social/tags/elixir" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>elixir</span></a><br>3/6</p>
Bonfire<p>Needle is an <a href="https://indieweb.social/tags/elixir" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>elixir</span></a> library that we have developed to provide universal foreign keys, shared data fields, and virtual &amp; configurable schemas for Ecto.</p><p>🔗 Read the docs: <a href="https://hexdocs.pm/needle/readme.html" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">hexdocs.pm/needle/readme.html</span><span class="invisible"></span></a><br>💬 Join the discussion on Elixir Forum: <a href="https://elixirforum.com/t/needle-universal-foreign-keys-shared-data-fields-virtual-and-configurable-schemas-for-ecto/65644" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">elixirforum.com/t/needle-unive</span><span class="invisible">rsal-foreign-keys-shared-data-fields-virtual-and-configurable-schemas-for-ecto/65644</span></a></p><p><a href="https://indieweb.social/tags/ecto" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ecto</span></a> <a href="https://indieweb.social/tags/myElixirStatus" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>myElixirStatus</span></a><br>1/6</p>
AdrianC<p><span class="h-card" translate="no"><a href="https://vmst.io/@maikel" class="u-url mention">@<span>maikel</span></a></span> yeah!<br />If you’re interested in more Ecto stuff, Dashbit wrote a « Little Ecto Cookbook » <a href="https://dashbit.co/ebooks/the-little-ecto-cookbook" target="_blank" rel="nofollow noopener noreferrer" translate="no"><span class="invisible">https://</span><span class="ellipsis">dashbit.co/ebooks/the-little-e</span><span class="invisible">cto-cookbook</span></a> too btw</p><p><a href="https://hachyderm.io/tags/MyElixirStatus" class="mention hashtag" rel="tag">#<span>MyElixirStatus</span></a> <a href="https://hachyderm.io/tags/Elixir" class="mention hashtag" rel="tag">#<span>Elixir</span></a> <a href="https://hachyderm.io/tags/Ecto" class="mention hashtag" rel="tag">#<span>Ecto</span></a></p>
T0ha<p>Soft deletes with Ecto and PostgreSQL</p><p>One of our clients at Dashbit has recently asked us what is the best way to implement soft-deletes with Ecto.</p><p>Tags: <a href="https://mastodon.social/tags/ecto" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ecto</span></a>, <a href="https://mastodon.social/tags/postgres" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>postgres</span></a>, <a href="https://mastodon.social/tags/postgresql" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>postgresql</span></a></p><p>via Pocket <a href="https://ift.tt/gXvkM12" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">ift.tt/gXvkM12</span><span class="invisible"></span></a></p><p>August 16, 2024 at 06:02PM</p>
T0ha<p>How to update multiple records with different values in Ecto.Repo.update_all</p><p>In this particular case, I was dealing with a table that leveraged parent_id to model a basic parent-child hierarchy. Through some larger business logic, I end up with a list of tuples [{1, "new root"}, {2, "Child 1"}, {3, "Child 2}] that essentially maps id =&gt; new name.</p><p>Tags: <a href="https://mastodon.social/tags/ecto" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ecto</span></a>, <a href="https://mastodon.social/tags/elixir" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>elixir</span></a>, <a href="https://mastodon.social/tags/postgres" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>postgres</span></a>, <a href="https://mastodon.social/tags/postgresql" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>postgresql</span></a>, №удшчшк</p><p>via Pocket <a href="https://ift.tt/5zNAP0i" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">ift.tt/5zNAP0i</span><span class="invisible"></span></a></p><p>August 09, 2024 at 02:54PM</p>
Alejandro Baez<p>I been slowly utilizing <a href="https://fosstodon.org/tags/prql" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>prql</span></a> instead of raw <a href="https://fosstodon.org/tags/sql" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>sql</span></a>. 😅 </p><p>So far, it makes sense when doing analytical jobs. But for language support, it is far more natural to use DSL features made for languages like <a href="https://fosstodon.org/tags/ecto" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ecto</span></a> in <a href="https://fosstodon.org/tags/elixir" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>elixir</span></a>. 😎</p><p><a href="https://prql-lang.org/book/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">prql-lang.org/book/</span><span class="invisible"></span></a></p>
Paweł ŚwiątkowskiNew blog post: Improving upserts in Ecto and PostgreSQL<br><br>(Ab)using database internals a bit to learn what my upsert just did.<br><br><a href="https://katafrakt.me/2024/06/04/improving-upserts-ecto-postgresql/" rel="nofollow noopener noreferrer" target="_blank">https://katafrakt.me/2024/06/04/improving-upserts-ecto-postgresql/</a><br><br><a class="hashtag" href="https://genserver.social/tag/elixir" rel="nofollow noopener noreferrer" target="_blank">#Elixir</a> <a class="hashtag" href="https://genserver.social/tag/ecto" rel="nofollow noopener noreferrer" target="_blank">#Ecto</a> <a class="hashtag" href="https://genserver.social/tag/postgresql" rel="nofollow noopener noreferrer" target="_blank">#PostgreSQL</a>