Yesql (Yesql v1.0.1) View Source

defmodule Query do
  use Yesql, driver: Postgrex, conn: MyApp.ConnectionPool

  Yesql.defquery("some/where/select_users_by_country.sql")
end

Query.users_by_country(country_code: "gbr")
# => {:ok, [%{name: "Louis", country_code: "gbr"}]}

Supported drivers

Configuration

Checkout the Postgrex or Ecto configuration guides.

Link to this section Summary

Link to this section Functions

Link to this macro

defquery(file_path, opts \\ [])

View Source (macro)