netler logo

Build Status Hex pm Hex pm

ExSqlClient

MSSQL driver for Elixir based on Netler and .NET's System.Data.SqlClient.

Goals

  • Provide a user friendly interface for interacting with MSSQL
  • Provide comprehensible type mappings between MSSQL and Elixir

Checklist

  • Support encrypted connections ☑
  • Support multiple result sets ☑
  • Implement the DbConnection behaviour

    • Connect ☑

      • Disconnect ☑
    • Execute ☑
    • Transactions ☑
    • Prepared Statements ☑
  • Release first version on hex.pm ☑
  • Provide an Ecto.Adapter that is compatible with Ecto 3 ☐

Code Examples

Connecting to a Server and Executing a Query

{:ok, conn} =
      ExSqlClient.start_link(
        connection_string:
          "Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;"
      )

{:ok, response} =
      ExSqlClient.query(conn, "SELECT * FROM [records] WHERE [status]=@status", %{status: 1})