This Week's Trending Top

This Month's Trending Top

mohsen
I’m using an Umbrella project for a Phoenix application, and I want to have one Ecto Repo and one PostgreSQL database shared by all apps....
New

This Year's Trending Top

jgb-solutions
Hey guys! I have an Album module with an Ecto schema. The schema has a cover_url virtual field that depends on the cover column to return...
New
foundart
I have a situation similar to create and insert 2 associated models. In my case User has_many Others and Others belongs_to User. I want...
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
theagilecoder
Given a list of structs based on a schema [ %App.Car{model: “E”}, %App.Car{model: “X”}, %App.Car{model: “Y”} ] Is there no way to ins...
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
yos1p
If I want to get the first error message from Ecto.Changeset, here’s what I have to do: error_msg = changeset.errors |> hd() ...
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
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
euphbriggs
I have a schema that contains an embedded schema, which I would like to rename a field on. For example: schema "menu_items" do field...
New
LionelMarco
In previous Phoenix version I have been running test in my database without any sandbox and everyting run well. Because already we have ...
New
mohammedzeglam
I am trying deploy phoenix app to cloud run every thing works locally fine using public IP but when i deployed to cloud run the app could...
New
vicb335
When submitting the form, the inputs should clear once I pass an empty changeset, they dont seem to be doing that if I am successful on t...
New
k-p
I’m trying to allow a user to add tags to a parent using a has_many relationship. I’d like to offer ‘suggested’ tags that they can click ...
New

Last Three Year's Trending Top

hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
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 Postgres...
New
kodepett
I’ve been experiencing a bit of timeout in production with respect to my queries. I’ve going through the docs and a few resources here, 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
COLABORATI
I seems like sqlite is kind of a no-go in phoenixworld - why is this the case? Certainly for development or smaller apps sqlite does very...
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
thijsvtol
I’m currently using a model button that referended is to another list of objects called items When I make a POST call to the service it ...
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 e...
New
fireproofsocks
There is a nice table showing the available data types used in Ecto Schemas: Ecto.Schema — Ecto v3.14.0 But I cannot find a correspondin...
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
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
luzaranza
According to the stock example cited in elixir Ecto 3.4.6 docs … post = MyRepo.get!(Post, 42) post = Ecto.Changeset.change post, title: ...
New
ycv005
How to convert following Ecto Query into the Plain RAW SQL %Workspace{name: "#{prefix() || "public"}"} |> Repo.insert() Your respons...
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
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
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 records...
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(...
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
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
Lily
In templates/appointment/index.html.eex: <%= for appointment <- @appointments do %> <tr> <td><%= appoi...
New
jaysoifer
Is there a way to rollback a specific migration and only that one (“skipping” all the other ones)? Would mix ecto.rollback -v 200809061...
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
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
chokchit
** (DBConnection.ConnectionError) connection not available and request was dropped from queue after 2733ms. You can configure how long re...
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
itssasanka
Hi all, Trying to get some more clarity over utc_datetime and naive_datetime for Ecto: The documentation above suggests that while ...
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

Options

Thread Display Mode




Thread Preview

Skip Thread Previews