Ecto 3 adapter for ExSqlClient (Microsoft SQL Server).
This adapter implements Ecto.Adapters.SQL on top of the existing
ExSqlClient.Protocol / DBConnection stack.
Usage
defmodule MyApp.Repo do
use Ecto.Repo,
otp_app: :my_app,
adapter: ExSqlClient.Ecto
endConfiguration
Pass the same connection options as ExSqlClient.start_link/1:
config :my_app, MyApp.Repo,
connection_string: "Server=localhost,1433;Database=mydb;User Id=sa;Password=secret;TrustServerCertificate=True"Known Limitations
Repo.stream/2— raises at runtime; cursors are not supported by the underlying protocol.query_many/4— raises at runtime; multiple result sets are not supported.- Migrations — not supported; use
ExSqlClient.query/4for DDL. on_conflict— only:raiseis supported.- Window functions — not supported.