Latest #ecto Threads Top

Fl4m3Ph03n1x
Background I am studying the Transaction Script pattern, namely from a book called “Learning Domain Driven Design”. For those of you u...
New
frerich
An application wishing to store larger amounts of data typically has two options for doing so: A new column on some table can be introd...
New
carlosfritz
I want to model the following relationship: A location has zero or one of multiple (currently 7) specifications (each specification is a...
New
belgoros
I wonder if there is a proper way to create Ecto schemas based on the existing DB tables in a Firebird database. Rails ActiverRecord mak...
New
juanazam
Most Elixir developers know Ecto.Schema and Ecto.Changeset inside out — but there’s a hidden gem that rarely gets the spotlight: Ecto Typ...
New
ffloyd
The Problem Currently, if I define a struct in the following way: defmodule MyStruct do # Both x and y will have the FIXED values unti...
New
klo
i have a schema defmodule Hello.Database.Template do schema "templates" do field(:name, :string) field(:description, :string) ...
New
anon9372508
I’m looking for feedback on my idea of how I can possibly build a solution to creating client side dom validations using a changeset. Be...
New
dli
I am trying to implement a macro that makes multi-column comparisons less verbose. # Draft -- does not work defmacro equals_parent(paren...
New
princemaple
Ok this is… more than weird It’s also consistent during insert_all with conflicts. I’m trying to back fill some missing data from bac...
New

This Week's Trending Top

This Month's Trending Top

This Year's Trending Top

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
aesmail
Hello guys, I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New
toraritte
Hi, Trying to make :utc_datetime the global default for Ecto schemas and migrations in our app, and use timestamptz as default datetime ...
New
belaustegui
I’ve recently started a new Phoenix project using Elixir 1.11, Phoenix 1.5 and Ecto 3.5. Everything runs smoothly but there is a recurre...
New
victorolinasc
Hello people! I have a requirement to perform a select query with IN clause using tuples. I am using PostgreSQL. Example: select * from...
New
dimitarvp
I couldn’t find an option in the Repo.update function that would skip setting updated_at. Is there a way?
New
silverdr
From another thread - making it a separate topic: To make sure I understand correctly (because TFM seems ambiguous on this to me): Wh...
New
artimath
I think I’ve tried 5 different graph database libraries in the last two days and not a single one has been able to connect to a remote/lo...
New
fuelen
Ecto.DevLogger is an alternative logger of SQL queries in development It inlines bindings into the query, so it is easy to copy-paste lo...
New
CodeBumpkin
WELL HOWDY Y’ALL! Is it possible to replicate this query in Ecto? SELECT unnest(ARRAY[5,10,15,20]) AS my_desired_column UNION ALL SELE...
New
jarlah
Testcontainers Testcontainers is an Elixir library that supports ExUnit tests, providing lightweight, throwaway instances of common datab...
New
Schultzer
Hey there, I wrote this low-level library recently, its goal is simply to lower the barrier between Elixir and SQL, and it does that by p...
New
germsvel
PhoenixTest provides a unified way of writing feature tests – regardless of whether you’re testing LiveView pages or static pages. It al...
New
jstimps
I’ve started development on an Ecto Adapter for FoundationDB: GitHub - ecto_foundationdb. FoundationDB is a distributed database with AC...
New
PragmaticBookshelf
Isaak Tsalicoglou Built for the curious, this isn’t your average programming book—it’s nearly 500 pages of hands-on mentorship beyond cod...
New

Last Three Year's Trending Top

johnnyicon
Hi all, I've just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I'm trying to use Postg...
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
Rashmi_prueba
What is the way to convert [ %{id: 7, name: "A", count: 1}, %{id: 8, name: "B", count: 1}, %{id: 9, name: "C", count: 0} ] to [ ...
New
cnck1387
Hi, Repo.insert, Repo.update and Repo.delete all return {:ok, resource} or {:error, changeset}. But Repo.get and Repo.get_by return res...
New
Frogglet
I am trying to use where exists (), which requires a fragment in ecto. I need to use a different table name for the subquery in different...
New
holandes22
I have an Entry with a many-to-many relationship to Tag. Like so: defmodule Tag do ... schema "tags" do field :name, :string ...
New
fireproofsocks
There is a nice table showing the available data types used in Ecto Schemas: https://hexdocs.pm/ecto/Ecto.Schema.html#module-primitive-ty...
New
ob1
Recently we partitioned a table with 28 million rows by its ULID to improve query speeds and reduce query timeouts. To do this I ended up...
New
woylie
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries. offset-based pagination with...
New
joaquinalcerro
Hi everyone, I finally had a bit of time to followup on this post: Best way to handle associations in single html form In my previous p...
New
OvermindDL1
The new(ish) project that I’m working on started with Ecto 2 so I had access to many_to_many, however I had issues actually using it so I...
New
ycv005
How to convert following Ecto Query into the Plain RAW SQL %Workspace{name: "#{prefix() || "public"}"} |> Repo.insert() Your respons...
New
axelson
I’m not sure how to interpret the following error. What is the relationship of PID 0.553.0 to 0.2195.0? It seems that 0.553.0 may be the ...
New
Ayliane
Hi there, I’m currently struggling with this bug, because i don’t have much logs and infos provided by my server. I have an endpoint cal...
New
Josh98
There are unique fields in the User table which can cause conflicts. So we introuduced the on_conflict: :nothing. Repo.insert_all( Use...
New

Trending Over Three Years Top

Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 record...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
alaister
Hi, I have the following ecto query: post_query = from p in Post, where: p.id == ^id, join: c in assoc(p, :comments), join: u in assoc(c,...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? https://hexdocs.pm/ecto/Ecto.Repo.h...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
Qqwy
I want to create a simple application (But one that is not tightly coupled with Phoenix). One of the things I am considering, is whether ...
New
shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
chensan
I have a User schema with a :from_id field set to type :string: defmodule TweetBot.Repo.Migrations.CreateUsers do use Ecto.Migration ...
New
fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
itssasanka
Hi all, Trying to get some more clarity over utc_datetime and naive_datetime for Ecto: https://hexdocs.pm/ecto/Ecto.Schema.html#module-...
New
sacepums
Hey guys. I'm new to elixir and im really stocked about it. But I ran into a bit of problem - I need to convert a date sting, for examp...
New
gonzofish
I’m currently trying to understand how to join three tables using Ecto. All the examples I’ve seen use 2, so maybe I’m just missing somet...
New
sabri
Can someone explain the settings of pool_size of Ecto in config file? and what is the recommend size? Thanks
New
  • Follow
  • Join
  • Shape
the conversation

Latest on Elixir Forum

Elixir Forum

Similar Portals

    None added yet

We're in Beta

About us Mission Statement