changed
hex_metadata.config
|
@@ -25,4 25,4 @@
|
25
25
|
{<<"optional">>,false},
|
26
26
|
{<<"repository">>,<<"hexpm">>},
|
27
27
|
{<<"requirement">>,<<"~> 1.1">>}]]}.
|
28
|
- {<<"version">>,<<"1.1.5">>}.
|
28
|
{<<"version">>,<<"1.1.6">>}.
|
changed
lib/tds/types.ex
|
@@ -938,8 938,7 @@ defmodule Tds.Types do
|
938
938
|
|
939
939
|
def encode_float_type(%Parameter{value: value} = param)
|
940
940
|
when is_float(value) do
|
941
|
- value = Decimal.new(value)
|
942
|
- encode_float_type(%{param | value: value})
|
941
|
encode_float_type(%{param | value: to_decimal(value)})
|
943
942
|
end
|
944
943
|
|
945
944
|
def encode_float_type(%Parameter{value: �cimal{} = value}) do
|
|
@@ -1237,11 1236,9 @@ defmodule Tds.Types do
|
1237
1236
|
|
1238
1237
|
def encode_float_descriptor(%Parameter{value: value} = param)
|
1239
1238
|
when is_float(value) do
|
1240
|
- param =
|
1241
|
- param
|
1242
|
- |> Map.put(:value, Decimal.new(value))
|
1243
|
-
|
1244
|
- encode_float_descriptor(param)
|
1239
|
param
|
1240
|
|> Map.put(:value, to_decimal(value))
|
1241
|
|> encode_float_descriptor
|
1245
1242
|
end
|
1246
1243
|
|
1247
1244
|
def encode_float_descriptor(%Parameter{value: �cimal{} = _dec}) do
|
changed
lib/tds/utils.ex
|
@@ -54,4 54,10 @@ defmodule Tds.Utils do
|
54
54
|
def error(error, _s) do
|
55
55
|
{:error, error}
|
56
56
|
end
|
57
|
|
58
|
if Kernel.function_exported?(Decimal, :from_float, 1) do
|
59
|
def to_decimal(float), do: Decimal.from_float(float)
|
60
|
else
|
61
|
def to_decimal(float), do: Decimal.new(float)
|
62
|
end
|
57
63
|
end
|
changed
mix.exs
|
@@ -5,7 5,7 @@ defmodule Tds.Mixfile do
|
5
5
|
def project do
|
6
6
|
[
|
7
7
|
app: :tds,
|
8
|
- version: "1.1.5",
|
8
|
version: "1.1.6",
|
9
9
|
elixir: "~> 1.0",
|
10
10
|
deps: deps(),
|
11
11
|
test_coverage: [tool: ExCoveralls],
|