MikaAK

MikaAK

EctoShorts - A library to help compose and create ecto queries with ease

Hello everyone!

I wanted to introduce EctoShorts to everyone here at the forum.

This was one of the first libraries I created and have been using in production apps for over 5 years. I decided to open source it a few years ago and have been using it across multiple companies, including the most recent company I’m at https://blitz.gg, where it’s used for almost all our ecto code. We use this to ingest and manage hundreds of billions of rows within Postgres, with millions of new rows being created daily (tl;dr it works at scale). It’s so useful, I even teach how to use it as a part of my course, so that developers can move quickly and focus on what matters!

I’m posting this now because I created this blog post to go alongside it, explaining a bit of the rationale and reasoning for creating this library, as well as some tips on how to work with it best! Not only that but I recently released 1.1.0 which includes the ability to query on relations as well now!

Most Liked

MikaAK

MikaAK

Dates do work since they’re simple > or < operations in ecto!

MikaAK

MikaAK

I realize I forgot to comment on HOW to do > and < filters. For this we have %{field: %{gt: value}} or %{field: %{lte: value}}

Hope this helps! There’s some cool filters on the todo list, like or queries and preloads and that would cover almost 90% of my querying use case, if there’s any others that you feel are missing let me know

Where Next?

Popular in Libraries Top

mhanberg
I just released the first version of Temple: an HTML DSL for Elixir and Phoenix! You can read this blog post or the docs for more info...
New
asiniy
Hey there! I wrote a download elixir package which does exactly what its name about - an easy way to download files. I saw solutions ...
New
seancribbs
Today I released a new dialyzer Mix task as the dialyzex package! At the time we started writing this task, the existing dialyzer integra...
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 49522 488
New
woylie
I released Doggo, a collection of unstyled Phoenix components. Features Unstyled Phoenix components. Storybook that can be added to...
New
wfgilman
I’ve cleaned up and open sourced three financial libraries I was using for my company. They are bindings for the APIs of these three comp...
New
tmbb
I’ve published the first version of my Makeup library. It’s a syntax highlighter for Elixir in the spirit of Pygments, Currently it highl...
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 42633 214
New
gjaldon
As the title states, EctoEnum has just been updated after some time of hardly any activity in the repo. Here’s the latest release: https:...
New
mplatts
With HEEX released we decided to start a components library using Tailwind CSS - check it out here: Petal Components. We also have a boi...
New

Other popular topics Top

Qqwy
Update: How to use the Blogs &amp; Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3268 119930 1237
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
977 41022 311
New
dotdotdotPaul
Okay, I'm having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I'm sure I'...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
Jim
As a follow up to my earlier question: I have the code compiling and running but not getting a successful login from the rest server. ...
New
polypush135
As many of you may have realized by now (sorry for all the posts here) I’ve been working on a db problem where I’m trying to aggregate a ...
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New

Sub Categories:

We're in Beta

About us Mission Statement