mirror of
https://github.com/ash-project/ash_postgres.git
synced 2024-09-20 05:23:18 +12:00
improvement: use latest type casting code from ash
This commit is contained in:
parent
bfd3b64dd6
commit
da925604a8
3 changed files with 9 additions and 9 deletions
|
@ -228,11 +228,11 @@ defmodule AshPostgres.SqlImplementation do
|
||||||
end
|
end
|
||||||
|
|
||||||
@impl true
|
@impl true
|
||||||
def determine_types(mod, args) do
|
def determine_types(mod, args, returns \\ nil) do
|
||||||
{types, returns} = Ash.Expr.determine_types(mod, args)
|
{types, new_returns} = Ash.Expr.determine_types(mod, args, returns)
|
||||||
|
|
||||||
returns =
|
new_returns =
|
||||||
case returns do
|
case new_returns do
|
||||||
{type, constraints} -> parameterized_type(type, constraints)
|
{type, constraints} -> parameterized_type(type, constraints)
|
||||||
other -> other
|
other -> other
|
||||||
end
|
end
|
||||||
|
@ -243,6 +243,6 @@ defmodule AshPostgres.SqlImplementation do
|
||||||
|
|
||||||
other ->
|
other ->
|
||||||
other
|
other
|
||||||
end), returns}
|
end), new_returns || returns}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
4
mix.exs
4
mix.exs
|
@ -162,8 +162,8 @@ defmodule AshPostgres.MixProject do
|
||||||
# Run "mix help deps" to learn about dependencies.
|
# Run "mix help deps" to learn about dependencies.
|
||||||
defp deps do
|
defp deps do
|
||||||
[
|
[
|
||||||
{:ash, ash_version("~> 3.1 and >= 3.1.5")},
|
{:ash, ash_version("~> 3.1 and >= 3.1.7")},
|
||||||
{:ash_sql, ash_sql_version("~> 0.2 and >= 0.2.16")},
|
{:ash_sql, ash_sql_version("~> 0.2 and >= 0.2.17")},
|
||||||
{:igniter, "~> 0.2.9"},
|
{:igniter, "~> 0.2.9"},
|
||||||
{:ecto_sql, "~> 3.11 and >= 3.11.3"},
|
{:ecto_sql, "~> 3.11 and >= 3.11.3"},
|
||||||
{:ecto, "~> 3.11 and >= 3.11.2"},
|
{:ecto, "~> 3.11 and >= 3.11.2"},
|
||||||
|
|
4
mix.lock
4
mix.lock
|
@ -1,6 +1,6 @@
|
||||||
%{
|
%{
|
||||||
"ash": {:hex, :ash, "3.1.5", "2e9b3c54ce5d52661e51ae76cf1648aa47a41876749025760267ca57e153c6ef", [:mix], [{:comparable, "~> 1.0", [hex: :comparable, repo: "hexpm", optional: false]}, {:decimal, "~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:ecto, "~> 3.7", [hex: :ecto, repo: "hexpm", optional: false]}, {:ets, "~> 0.8", [hex: :ets, repo: "hexpm", optional: false]}, {:igniter, "~> 0.2.12", [hex: :igniter, repo: "hexpm", optional: false]}, {:jason, ">= 1.0.0", [hex: :jason, repo: "hexpm", optional: false]}, {:picosat_elixir, "~> 0.2", [hex: :picosat_elixir, repo: "hexpm", optional: true]}, {:plug, ">= 0.0.0", [hex: :plug, repo: "hexpm", optional: true]}, {:reactor, ">= 0.8.1 and < 1.0.0-0", [hex: :reactor, repo: "hexpm", optional: false]}, {:simple_sat, ">= 0.1.1 and < 1.0.0-0", [hex: :simple_sat, repo: "hexpm", optional: true]}, {:spark, ">= 2.2.7 and < 3.0.0-0", [hex: :spark, repo: "hexpm", optional: false]}, {:splode, "~> 0.2", [hex: :splode, repo: "hexpm", optional: false]}, {:stream_data, "~> 1.0", [hex: :stream_data, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.1", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "9f43e066e0b478343091242c133d7a32b22f9f9be111d1bc950f76f1609c83e3"},
|
"ash": {:hex, :ash, "3.1.7", "99e50347e70dd6fa62c9afa5246ef83e363bb7c0236b2081d7b7f35b6095c099", [:mix], [{:comparable, "~> 1.0", [hex: :comparable, repo: "hexpm", optional: false]}, {:decimal, "~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:ecto, "~> 3.7", [hex: :ecto, repo: "hexpm", optional: false]}, {:ets, "~> 0.8", [hex: :ets, repo: "hexpm", optional: false]}, {:igniter, "~> 0.2.12", [hex: :igniter, repo: "hexpm", optional: false]}, {:jason, ">= 1.0.0", [hex: :jason, repo: "hexpm", optional: false]}, {:picosat_elixir, "~> 0.2", [hex: :picosat_elixir, repo: "hexpm", optional: true]}, {:plug, ">= 0.0.0", [hex: :plug, repo: "hexpm", optional: true]}, {:reactor, ">= 0.8.1 and < 1.0.0-0", [hex: :reactor, repo: "hexpm", optional: false]}, {:simple_sat, ">= 0.1.1 and < 1.0.0-0", [hex: :simple_sat, repo: "hexpm", optional: true]}, {:spark, ">= 2.2.7 and < 3.0.0-0", [hex: :spark, repo: "hexpm", optional: false]}, {:splode, "~> 0.2", [hex: :splode, repo: "hexpm", optional: false]}, {:stream_data, "~> 1.0", [hex: :stream_data, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.1", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "c16b5a8c9dc5bd081b61e76e97abff6f61fbf7f0f34955901755644dcd7519ce"},
|
||||||
"ash_sql": {:hex, :ash_sql, "0.2.16", "48317c1d353f9c0578dbf9ae7cc913f6d409a8bcccff5c76a81daf2d6d883df6", [:mix], [{:ash, ">= 3.1.5 and < 4.0.0-0", [hex: :ash, repo: "hexpm", optional: false]}, {:ecto, "~> 3.9", [hex: :ecto, repo: "hexpm", optional: false]}, {:ecto_sql, "~> 3.9", [hex: :ecto_sql, repo: "hexpm", optional: false]}], "hexpm", "7355a75bfa335bbaa73e4f7ba429fc487adfc178d054e7aa0af7ea1a57a35b4c"},
|
"ash_sql": {:hex, :ash_sql, "0.2.17", "bc548b434ce9ca6f2bf85469ecef9353bfbf99fad11382fe8a2219e16feeb4ff", [:mix], [{:ash, ">= 3.1.7 and < 4.0.0-0", [hex: :ash, repo: "hexpm", optional: false]}, {:ecto, "~> 3.9", [hex: :ecto, repo: "hexpm", optional: false]}, {:ecto_sql, "~> 3.9", [hex: :ecto_sql, repo: "hexpm", optional: false]}], "hexpm", "e2ab3b6b545b20ec037f76af0ddc3a99f9da96f2f7d10f3c17c766b9fd7b6445"},
|
||||||
"benchee": {:hex, :benchee, "1.3.1", "c786e6a76321121a44229dde3988fc772bca73ea75170a73fd5f4ddf1af95ccf", [:mix], [{:deep_merge, "~> 1.0", [hex: :deep_merge, repo: "hexpm", optional: false]}, {:statistex, "~> 1.0", [hex: :statistex, repo: "hexpm", optional: false]}, {:table, "~> 0.1.0", [hex: :table, repo: "hexpm", optional: true]}], "hexpm", "76224c58ea1d0391c8309a8ecbfe27d71062878f59bd41a390266bf4ac1cc56d"},
|
"benchee": {:hex, :benchee, "1.3.1", "c786e6a76321121a44229dde3988fc772bca73ea75170a73fd5f4ddf1af95ccf", [:mix], [{:deep_merge, "~> 1.0", [hex: :deep_merge, repo: "hexpm", optional: false]}, {:statistex, "~> 1.0", [hex: :statistex, repo: "hexpm", optional: false]}, {:table, "~> 0.1.0", [hex: :table, repo: "hexpm", optional: true]}], "hexpm", "76224c58ea1d0391c8309a8ecbfe27d71062878f59bd41a390266bf4ac1cc56d"},
|
||||||
"bunt": {:hex, :bunt, "1.0.0", "081c2c665f086849e6d57900292b3a161727ab40431219529f13c4ddcf3e7a44", [:mix], [], "hexpm", "dc5f86aa08a5f6fa6b8096f0735c4e76d54ae5c9fa2c143e5a1fc7c1cd9bb6b5"},
|
"bunt": {:hex, :bunt, "1.0.0", "081c2c665f086849e6d57900292b3a161727ab40431219529f13c4ddcf3e7a44", [:mix], [], "hexpm", "dc5f86aa08a5f6fa6b8096f0735c4e76d54ae5c9fa2c143e5a1fc7c1cd9bb6b5"},
|
||||||
"castore": {:hex, :castore, "1.0.8", "dedcf20ea746694647f883590b82d9e96014057aff1d44d03ec90f36a5c0dc6e", [:mix], [], "hexpm", "0b2b66d2ee742cb1d9cb8c8be3b43c3a70ee8651f37b75a8b982e036752983f1"},
|
"castore": {:hex, :castore, "1.0.8", "dedcf20ea746694647f883590b82d9e96014057aff1d44d03ec90f36a5c0dc6e", [:mix], [], "hexpm", "0b2b66d2ee742cb1d9cb8c8be3b43c3a70ee8651f37b75a8b982e036752983f1"},
|
||||||
|
|
Loading…
Reference in a new issue