josevalim

josevalim

Creator of Elixir

Hello everyone,

This past weekend we have released Ecto v2.1.0-rc.5, hopefully the last release candidate for Ecto v2.1: ecto/CHANGELOG.md at master · elixir-ecto/ecto · GitHub

If you were using “or_where/or_having” from previous RCs, note “or_where: ^keywords” changed behaviour in this last RC.

We have also released Postgrex 0.13-rc which includes a new API for extensions that is about 40% faster when running Postgrex queries.

Showing Posts 1 to 7

lucidstack

lucidstack

Thank you very much for this, @josevalim!

I’ve noticed that you haven’t got a git tag for this version, which breaks the links from hexdocs. Just a heads-up!

josevalim

josevalim OP

Creator of Elixir

Done, thank you.

thousandsofthem

thousandsofthem

Question regarding dynamic expressions, don’t get how they work nor why do we need them. from changelog:

dynamic = false

dynamic =
  if params["is_public"] do
    dynamic([p], p.is_public or ^dynamic)
  else
    dynamic
  end

isn’t it means false([p], p.is_public or ^false). o_O

Regular non-dynamic code looks like

q = Post
q = 
  if params["is_public"] do
    q |>  where([p], p.is_public)
  else
    q
  end
josevalim

josevalim OP

Creator of Elixir

@thousandsofthem imagine you need to go through a bunch of parameters in no particular order. For such, you ned to start with an initial value (in this case, false) and compose them arbitrarily until it is interpolated. The Ecto book also contains examples of where to use dynamic.

thousandsofthem

thousandsofthem

Thanks.
Still, false(..) looks counterintuitive, it feels wrong that i can apply () to boolean value
(i.e. dynamic = false; dynamic = dynamic(...))

bobbypriambodo

bobbypriambodo

Echoing @thousandsofthem, I’m inclined to think that there are two different semantics of dynamic in that snippet: one is a value (initialized as false and gets updated with the ifs) and another is a function/macro. Is that right?

josevalim

josevalim OP

Creator of Elixir

Hrm, not quite. I will work on better examples.

— All posts loaded —

Where Next? Top

Trending in News Top

josevalim
Hi everyone, I am sharing this announcement here in case some of you might be interested. Dear colleagues, IRIF (Paris) is opening a p...
New

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New
KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
juhalehtonen
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews