News for hackers. Stuff that matters.
Re:Write an SQL query builder in 150 lines of Python by kiliancs on Friday August 27, 2021 @01:25PM (#28330560)
I always like to bring up Ecto. Really nice sweet spot IMO.

  query = from u in "users",
            where: u.age > 18 or is_nil(u.email),
            select: %{name: u.name, age: u.age}
  
  # Returns maps as defined in select
  Repo.all(query)
https://hexdocs.pm/ecto/Ecto.html#module-query

There are no comments on this comment yet.