Elixir ecto connect to an existing DB
问题 After doing some research in the link below https://github.com/elixir-lang/ecto/tree/master/examples/simple I am a little confused about how to use ecto in elixir. There is always a schema declared like defmodule Weather do use Ecto.Model schema "weather" do field :city, :string field :temp_lo, :integer field :temp_hi, :integer field :prcp, :float, default: 0.0 timestamps end end and then in the 'Query' part def sample_query do query = from w in Weather, where: w.prcp > 0.0 or is_nil(w.prcp),