changed hex_metadata.config
 
@@ -23,4 +23,4 @@
23
23
{<<"optional">>,false},
24
24
{<<"repository">>,<<"hexpm">>},
25
25
{<<"requirement">>,<<"~> 1.1">>}]]}.
26
- {<<"version">>,<<"2.2.0">>}.
26
+ {<<"version">>,<<"2.2.1">>}.
changed lib/tds_ecto/connection.ex
 
@@ -26,6 +26,7 @@ if Code.ensure_loaded?(Tds) do
26
26
Tds.Protocol.connect(opts)
27
27
end
28
28
29
+ @doc false
29
30
def child_spec(opts) do
30
31
Tds.child_spec(opts)
31
32
end
 
@@ -138,9 +139,9 @@ if Code.ensure_loaded?(Tds) do
138
139
case value do
139
140
<<_::64, ?-, _::32, ?-, _::32, ?-, _::32, ?-, _::96>> ->
140
141
{:ok, value} = Tds.UUID.dump(value)
141
- {value, :binary}
142
+ {value, :uuid}
142
143
any ->
143
- {any, :binary}
144
+ {any, :uuid}
144
145
end
145
146
end
146
147
 
@@ -202,15 +203,15 @@ if Code.ensure_loaded?(Tds) do
202
203
203
204
## Transaction
204
205
205
- def begin_transaction do
206
+ def begin_transaction() do
206
207
"BEGIN TRANSACTION"
207
208
end
208
209
209
- def rollback do
210
+ def rollback() do
210
211
"ROLLBACK TRANSACTION"
211
212
end
212
213
213
- def commit do
214
+ def commit() do
214
215
"COMMIT TRANSACTION"
215
216
end
216
217
 
@@ -803,15 +804,13 @@ if Code.ensure_loaded?(Tds) do
803
804
end
804
805
805
806
defp expr(%Tagged{value: binary, type: :uuid}, _sources, _query) when is_binary(binary) do
806
- {:ok, binary} =
807
- case binary do
808
- <<_::64, ?-, _::32, ?-, _::32, ?-, _::32, ?-, _::96>> ->
809
- Tds.UUID.dump(binary)
810
-
811
- any ->
812
- any
813
- end
814
- binary
807
+ case binary do
808
+ <<_::64, ?-, _::32, ?-, _::32, ?-, _::32, ?-, _::96>> ->
809
+ {:ok, value} = Tds.UUID.dump(binary)
810
+ value
811
+ any ->
812
+ any
813
+ end
815
814
end
816
815
817
816
defp expr(%Tagged{value: other, type: type}, sources, query)
 
@@ -1305,7 +1304,7 @@ if Code.ensure_loaded?(Tds) do
1305
1304
end
1306
1305
1307
1306
defp reference_name(%Reference{name: nil}, table, column),
1308
- do: quote_name("FK_#{table.prefix}_#{table.name}_#{column}")
1307
+ do: quote_name("#{table.name}_#{column}_fkey")
1309
1308
1310
1309
defp reference_name(%Reference{name: name}, _table, _column), do: quote_name(name)
changed mix.exs
 
@@ -1,7 +1,7 @@
1
1
defmodule TDS.Ecto.Mixfile do
2
2
use Mix.Project
3
3
4
- @version "2.2.0"
4
+ @version "2.2.1"
5
5
6
6
def project() do
7
7
[
 
@@ -25,6 +25,7 @@ defmodule TDS.Ecto.Mixfile do
25
25
[
26
26
{:ecto, ">= 2.0.0"},
27
27
{:tds, "~> 1.1"},
28
+ # {:tds, path: "../tds"},
28
29
{:ex_doc, ">= 0.0.0", only: :dev},
29
30
{:poison, ">= 0.0.0", only: :test}
30
31
]