And it has a Stack Overflow community with around 50 tagged questions as of December 2013. And it has a query DSL library called Ecto, which describes itself as such:
defmodule Hello do IO.puts "Defining the function world" def world do IO.puts "Hello World" end IO.puts "Function world defined" end
Ecto is a domain specific language for writing queries and interacting with databases in Elixir.Example queries can be seen on the project’s GitHub readme page: A simple SELECT
use Ecto.Query query = from w in Weather, where: w.prcp > 0 or w.prcp == nil, select: w Repo.all(query)
Looks like a slick (but not typesafe?) querying DSL mix between LINQ and Clojure’s sqlkorma. For those brave ones among you using the Elixir language, this might be your one (and only) choice to access a SQL database! Good luck!
query = from p in Post, where: p.id == 42, left_join: c in p.comments, select: assoc(p, c) [post] = Repo.all(query) post.comments.to_list