5

I am looking for a way to use call stored procedure, there was no found. Is it possible in an elixir's ecto lib?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
aposto
  • 566
  • 5
  • 14

1 Answers1

7

You can go directly through the SQL adapter API:

Ecto.Adapters.SQL.query(YourRepo, "stored_procedure(?, ?)", [param1, param2])

More info here: https://hexdocs.pm/ecto/#!Ecto.Adapters.SQL.html

José Valim
  • 50,409
  • 12
  • 130
  • 115