Is it possible to generate SQL prepared statements with Ecto Query, without using Repo?
I need to query data from one of thousands of SQLite databases, and I am using Sqlitex to do that using raw SQL queries.
i figured I could get a lot of benefits like SQL injection prevention, more maintainable query using Ecto.Query like this:
query = from u in "users", join: c in "comments", on: c.user_id == u.id, where: u.active == true, group_by: [u.name, u.email], select: [u.name, u.email, count(c.id)]
I cannot use
Repo because I do not have a specific database to connect to during Phoenix boot.
However, I am not able to generate prepared statements from this query that I could use with Sqlitex.
Anyone has idea on how to generate the prepared statements without using Repo?