Skip to content

Commit 8e27833

Browse files
committed
Remove unused functions
1 parent 1e923a1 commit 8e27833

File tree

4 files changed

+3
-7
lines changed

4 files changed

+3
-7
lines changed

lib/ecto/adapters/postgres/connection.ex

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1304,7 +1304,6 @@ if Code.ensure_loaded?(Postgrex) do
13041304
defp ecto_to_db(:naive_datetime), do: "timestamp"
13051305
defp ecto_to_db(:naive_datetime_usec), do: "timestamp"
13061306
defp ecto_to_db(atom) when is_atom(atom), do: Atom.to_string(atom)
1307-
defp ecto_to_db(str) when is_binary(str), do: str
13081307
defp ecto_to_db(type) do
13091308
raise ArgumentError,
13101309
"unsupported type `#{inspect(type)}`. The type can either be an atom, a string " <>

lib/ecto/adapters/tds/connection.ex

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1613,15 +1613,12 @@ if Code.ensure_loaded?(Tds) do
16131613
Atom.to_string(atom)
16141614
end
16151615

1616-
defp ecto_to_db(str, nil, nil, nil, _) when is_binary(str), do: str
1617-
16181616
defp ecto_to_db(type, _, _, _, _) do
16191617
raise ArgumentError,
16201618
"unsupported type `#{inspect(type)}`. The type can either be an atom, a string " <>
16211619
"or a tuple of the form `{:map, t}` where `t` itself follows the same conditions."
16221620
end
16231621

1624-
16251622
defp error!(nil, message) do
16261623
raise ArgumentError, message
16271624
end

test/ecto/adapters/postgres_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1200,7 +1200,7 @@ defmodule Ecto.Adapters.PostgresTest do
12001200
[{:add, :name, :string, [default: "Untitled", size: 20, null: false]},
12011201
{:add, :price, :numeric, [precision: 8, scale: 2, default: {:fragment, "expr"}]},
12021202
{:add, :on_hand, :integer, [default: 0, null: true]},
1203-
{:add, :published_at, "time without time zone", [null: true]},
1203+
{:add, :published_at, :"time without time zone", [null: true]},
12041204
{:add, :is_active, :boolean, [default: true]},
12051205
{:add, :tags, {:array, :string}, [default: []]},
12061206
{:add, :languages, {:array, :string}, [default: ["pt", "es"]]},

test/ecto/adapters/tds_test.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,8 +1121,8 @@ defmodule Ecto.Adapters.TdsTest do
11211121
{:add, :name, :string, [default: "Untitled", size: 20, null: false]},
11221122
{:add, :price, :numeric, [precision: 8, scale: 2, default: {:fragment, "expr"}]},
11231123
{:add, :on_hand, :integer, [default: 0, null: true]},
1124-
{:add, :likes, "smallint unsigned", [default: 0, null: false]},
1125-
{:add, :published_at, "datetime(6)", [null: true]},
1124+
{:add, :likes, :"smallint unsigned", [default: 0, null: false]},
1125+
{:add, :published_at, :"datetime(6)", [null: true]},
11261126
{:add, :is_active, :boolean, [default: true]}
11271127
]}
11281128

0 commit comments

Comments
 (0)