Elixir Notes & Commands
Assuming your Repo and User are aliased, this command returns a count of users:
Aliased, like:
NameOfProject.Repo
NameOfProject.Accounts.User
Returning a count of users:
Repo.aggregate(User, :count, :id)
This is the same as User.count
in Ruby/Rails.
Date
2023-02-19
Status
release
Tags
ruby, elixir, and code
Series
N/A