josevalim

josevalim

Creator of Elixir

See the release notes: https://github.com/elixir-ecto/ecto/releases/tag/2.2.0-rc.0

To try it in your projects: {:ecto, "~> 2.2.0-rc", override: true}.

Showing Posts 1 to 10

OvermindDL1

OvermindDL1

Hah, I was just typing up a post!

My post was:

Just wanted to note that an awesome feature has been added to Ecto 2.2.0-rc.0 that was just released. select_merge (and select(blah, merge(bloop)).

This is a feature that has been wanted a few times here and so just want to point it out (I’ll be rewriting and simplifying a lot of my complex queries soon!). :slight_smile:

See the docs for it at: Ecto.Query – Ecto v2.2.0-rc.0

OvermindDL1

OvermindDL1

Also, is it just me or are the docs showing “Toggle Sidebar” floating on the top sidebar button? It looks like the sr-only css is missing…

josevalim

josevalim OP

Creator of Elixir

Do a hard refresh on the docs page. :slight_smile: And I would love some feedback on the select_merge feature.

OvermindDL1

OvermindDL1

Hmm, just did. Also told chrome to ignore the cache and fetch on every request and it still is not getting a css where .sr-only exists. it is currently requesting https://hexdocs.pm/ecto/2.2.0-rc.0/dist/app-091c05798a.css if that helps.

Initially it looks awesome! It will so very much simplify a lot of my complex monstrous builders to this old Oracle horror, plus I can return less data in many areas now too instead of dummy data! :slight_smile:

OvermindDL1

OvermindDL1

Also, have you thought about supporting this syntax for merging selects? It seems much more readable to me (select_merge can get lost in the keyword lists in my eyes now that I’m using it and merge seems foreign):

query = from p in Post, select: %{}

query =
  if include_title? do
    from p in query, select: %{p | title: p.title}
  else
    query
  end

query =
  if include_visits? do
    from p in query, select: %{p | visits: p.visits}
  else
    query
  end
law

law

Yayyyy - Having on_conflict support a constraint name is going to replace a bunch of manual upserting in my codebase, and being about to use associations with put_change is also excellent.

Thank you :tada:

sergio

sergio

I love this change the most:

Ecto now will also warn at compile time of invalid relationships, such as a belongs_to that points to a schema that does not exist.

Thanks for the hard work!

OvermindDL1

OvermindDL1

It’s fixed now, probably just had to propagate through the cloudflare CDN or so. ^.^

axelson

axelson

Scenic Core Team

[Ecto.Migration] Add reversible execute/2 to migrations

Blew my mind. Is Ecto able to automatically determine if the arbitrary SQL is reversible? Or does it just skip that execution on rollback?

Edit: nevermind. I see that it is execute/2, the second argument is what you execute on rollback. Makes sense.

ijunaidfarooq

ijunaidfarooq

while you are rewriting already will you please mention here? one of use case as well? that how and where it helped you?

Where Next? Top

Trending in News Top

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
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
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews