I am looking for a way to use call stored procedure, there was no found. Is it possible in an elixir's ecto lib?
Asked
Active
Viewed 1,748 times
1 Answers
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
-
Error occurred in in MySQL 5.x. (** (Mariaex.Error) unsupported query) – aposto May 07 '15 at 02:41
-
1Oops, I believe you need to use CALL before calling the procedure in MySQL. – José Valim May 07 '15 at 09:25