Skip to content

Commit

Permalink
upgrade decimal to 1.1 and DBConnection 1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mjaric committed Feb 18, 2017
1 parent 674e50b commit 5ca0553
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 12 deletions.
6 changes: 3 additions & 3 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule Tds.Mixfile do

def project do
[app: :tds,
version: "0.1.0-alpha",
version: "0.6.0-alpha",
elixir: "~> 1.0",
deps: deps,
source_url: "https://github.com/livehelpnow/tds",
Expand All @@ -30,8 +30,8 @@ defmodule Tds.Mixfile do
# Type `mix help deps` for more examples and options
defp deps do
[
{:decimal, "~> 1.1"},
{:db_connection, "~> 1.0-rc"}
{:decimal, "~> 1.2"},
{:db_connection, "~> 1.1"}
]
end

Expand Down
6 changes: 3 additions & 3 deletions mix.lock
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%{"connection": {:hex, :connection, "1.0.3", "3145f7416be3df248a4935f24e3221dc467c1e3a158d62015b35bd54da365786", [:mix], []},
"db_connection": {:hex, :db_connection, "1.0.0-rc.3", "d9ceb670fe300271140af46d357b669983cd16bc0d01206d7d3222dde56cf038", [:mix], [{:sbroker, "~> 1.0.0-beta.3", [hex: :sbroker, optional: true]}, {:poolboy, "~> 1.5", [hex: :poolboy, optional: true]}, {:connection, "~> 1.0.2", [hex: :connection, optional: false]}]},
"decimal": {:hex, :decimal, "1.1.0", "3333732f17a90ff3057d7ab8c65f0930ca2d67e15cca812a91ead5633ed472fe", [:mix], []},
%{"connection": {:hex, :connection, "1.0.4", "a1cae72211f0eef17705aaededacac3eb30e6625b04a6117c1b2db6ace7d5976", [:mix], []},
"db_connection": {:hex, :db_connection, "1.1.0", "b2b88db6d7d12f99997b584d09fad98e560b817a20dab6a526830e339f54cdb3", [:mix], [{:connection, "~> 1.0.2", [hex: :connection, optional: false]}, {:poolboy, "~> 1.5", [hex: :poolboy, optional: true]}, {:sbroker, "~> 1.0", [hex: :sbroker, optional: true]}]},
"decimal": {:hex, :decimal, "1.3.1", "157b3cedb2bfcb5359372a7766dd7a41091ad34578296e951f58a946fcab49c6", [:mix], []},
"timex": {:hex, :timex, "0.13.4"}}
2 changes: 1 addition & 1 deletion test/plp_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defmodule PLPTest do
)
""", [])
data = File.read!("#{__DIR__}/plp_data.txt")
query("INSERT INTO plp_test VALUES(@1)",[%Tds.Parameter{name: "@1", value: data, type: :string}])
assert :ok == query("INSERT INTO plp_test VALUES(@1)",[%Tds.Parameter{name: "@1", value: data, type: :string}])
assert [[data]] == query("SELECT text FROM plp_test",[])
query("DROP TABLE plp_test", [])
end
Expand Down
8 changes: 4 additions & 4 deletions test/rpc_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,13 @@ defmodule RPCTest do
%Tds.Parameter{name: "@1", value: nil, type: :string}
]
assert :ok = query(sql, params)
#assert [{nil}, {nil}, {nil}] = query("SELECT nchar FROM TestTable WHERE nchar IS NULL ORDER BY nchar", [])
assert [[nil], [nil], [nil], [nil]] = query("SELECT nchar FROM TestTable WHERE nchar IS NULL ORDER BY nchar", [])
assert :ok = query("DROP TABLE dbo.TestTable", [])
end

# test "Descriptors", context do
# assert [{1.0}] = query("SELECT @1", [%Parameter{name: "@1", value: 1.0}])
# end
test "Descriptors", context do
assert [[1.0]] = query("SELECT @1", [%Parameter{name: "@1", value: 1.0}])
end

test "Char to binary encoding", context do
query("DROP TABLE dbo.TestTable2", [])
Expand Down
1 change: 0 additions & 1 deletion test/test_helper.exs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
ExUnit.start()


defmodule Tds.TestHelper do
require Logger
defmacro query(stat, params, opts \\ []) do
Expand Down

0 comments on commit 5ca0553

Please sign in to comment.