What’s the error? Works for me, but used like you did gives you a error that says “queries that do not have a schema need to explicitly pass a :select clause in query”.
Also you might need the ^ operator in front of that constant "ACME" string.
Try this:
schema_name = "some_table"
Test.Repo.all(from a in schema_name, where: a.name == ^"ACME", select: a.id)
EDIT: by the way, do you mean Ecto schema (which is actually a table) or PostgreSQL schema (which is a different problem and answer altogether)? I assume it’s the former.






















