defmodule Sample.User do use Sample.Web, :model schema "users" do field :name, :string field :age, :integer timestamps() end end #全件取得 User |> Repo.all() #SELECT u0.`id`, u0.`name`, u0.`age`, u0.`inserted_at`, u0.`updated_at` FROM `users` AS u0 #IDから取得 User |> Repo.get!(1) #SELECT u0.`id`, u0.`name`, u0.`age`, u0.`inserted_at`, u0.`updated_at` FROM `users` AS u0 WHERE (u0.`id` = ?) #[1] User |> se