Trying to use turbo_ecto with triplex

For this I need an easy way to pass a prefix param to Repo.
I can’t find any documentation or example for that.
This is my old query which after adding a prefix works with triplex

  def list_users do
    Repo.all(Users, prefix: "demo")
  end

and my Turbo repo call is:

 Turbo.Ecto.turbo(Users, params, entry_name: "users")

I tried to pass a prefix to turbo ecto but it does not work

If you change your ecto_turbo dependency to my github fork to {:turbo_ecto, git: "git@github.com:redmar/turbo_ecto.git"} then it should work with:

Turbo.Ecto.turbo(Users, params, entry_name: "users", prefix: "demo")

You can look into my last commit of that repo here.
AFAICS it’s indeed missing from turbo_ecto but easily added, so I guess I should file a pull request soon but for now you can use my fork (via the above git dependency line in mix.exs) if you want.
Have fun coding! :slight_smile:

1 Like

I’ll try it. Big thanks