I am looking for a way to use call stored procedure, there was no found. Is it possible in an elixir's ecto lib?
我正在寻找一种使用调用存储过程的方法,没有找到。有没有可能在elixir的ecto lib中?
1 个解决方案
#1
6
You can go directly through the SQL adapter API:
您可以直接通过SQL适配器API:
Ecto.Adapters.SQL.query(YourRepo, "stored_procedure(?, ?)", [param1, param2])
More info here: https://hexdocs.pm/ecto/#!Ecto.Adapters.SQL.html
更多信息:https://hexdocs.pm/ecto/#!Ecto.Adapters.SQL.html
#1
6
You can go directly through the SQL adapter API:
您可以直接通过SQL适配器API:
Ecto.Adapters.SQL.query(YourRepo, "stored_procedure(?, ?)", [param1, param2])
More info here: https://hexdocs.pm/ecto/#!Ecto.Adapters.SQL.html
更多信息:https://hexdocs.pm/ecto/#!Ecto.Adapters.SQL.html