Skip to content

Commit

Permalink
Added nil/null type encoding paired: Jae
Browse files Browse the repository at this point in the history
  • Loading branch information
toddharding committed Mar 13, 2017
1 parent 092d977 commit 24665f1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lib/mssqlex/type.ex
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ defmodule Mssqlex.Type do
end
end

def encode(nil, _) do
{:sql_integer, [:null]}
end

def encode(value, _) do
raise %Mssqlex.Error{
message: "could not parse param #{inspect value} of unrecognised type."}
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule Mssqlex.Mixfile do

def project do
[app: :mssqlex,
version: "0.4.2",
version: "0.4.3",
description: "Adapter to Microsoft SQL Server. Using DBConnection and ODBC.",
elixir: "~> 1.4",
build_embedded: Mix.env == :prod,
Expand Down

0 comments on commit 24665f1

Please sign in to comment.