elixir-lang/ecto — pull request #230 by MSch (2014-07-25 18:59:12+00:00)
Title: No way to have an array of binaries without hacks

I ran into this issue just now, I've got an array of binaries but can't express that with the `array/2` helper since the simple `array(^some_list, :binary)` complains that I've got a list of strings. So I had to do this:
```elixir
query = Ecto.Query.from(c in DB.Client,
join: ct in DB.ClientToken, on: ct.client_id == c.id,
where: ct.token in array(^Enum.map(other_clients, &%Elixir.Ecto.Binary{value: &1}), ^:binary),
select: {c.id, c.user_id})
```

I think we could special case `array/2` to typecast strings into binaries when `:binary` is given as the type. I guess that would happen in `value_to_type(%Ecto.Array{value: list, type: type}, fun)`?