From 72d353a4795e88e2955ffda3d16e47efc0bd9ff0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=CE=BBstor?= Date: Mon, 8 Jan 2024 12:19:43 +0100 Subject: [PATCH] [minor] Updating deps (#12) --- .github/workflows/elixir.yml | 14 +++++------ .github/workflows/hex-deploy.yml | 8 +++---- lib/ravix_ecto.ex | 2 +- lib/ravix_ecto/adapter.ex | 34 +++++++++++++++++++++++++++ lib/ravix_ecto/schema.ex | 7 +++--- mix.lock | 40 ++++++++++++++++---------------- test/ecto/repo_test.exs | 7 ++++-- 7 files changed, 75 insertions(+), 37 deletions(-) diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml index a768841..0cbf6bc 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/elixir.yml @@ -12,8 +12,11 @@ jobs: runs-on: ubuntu-latest env: MIX_ENV: test + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true container: - image: elixir:1.14.4-alpine + image: hexpm/elixir:1.16.0-erlang-26.2.1-alpine-3.17.5 services: ravendb: image: ravendb/ravendb @@ -24,9 +27,6 @@ jobs: RAVEN_License_Eula_Accepted: "true" RAVEN_Security_UnsecuredAccessAllowed: "PublicNetwork" steps: - - uses: technote-space/auto-cancel-redundant-job@v1 - with: - EXCLUDE_MERGED: "true" - name: Install Git/Curl/GNU Tar run: apk add --no-cache curl tar git make gcc libc-dev g++ - name: Fix git permissions @@ -41,10 +41,10 @@ jobs: path: | _build deps - key: ${{ runner.os }}-01-build-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-02-build-${{ hashFiles('mix.lock') }} restore-keys: | - ${{ runner.os }}-01-build-${{ hashFiles('mix.lock') }} - ${{ runner.os }}-01-build- + ${{ runner.os }}-02-build-${{ hashFiles('mix.lock') }} + ${{ runner.os }}-02-build- # - name: Dyalizer Cache # uses: actions/cache@v3 # id: mix-dialyzer diff --git a/.github/workflows/hex-deploy.yml b/.github/workflows/hex-deploy.yml index 84496e5..bd6bbfe 100644 --- a/.github/workflows/hex-deploy.yml +++ b/.github/workflows/hex-deploy.yml @@ -11,7 +11,7 @@ jobs: env: MIX_ENV: dev container: - image: elixir:1.14.4-alpine + image: hexpm/elixir:1.16.0-erlang-26.2.1-alpine-3.17.5 steps: - name: Install Git/Curl/GNU Tar run: apk add --no-cache curl tar git make gcc libc-dev g++ @@ -31,10 +31,10 @@ jobs: path: | _build deps - key: ${{ runner.os }}-01-build-${{ hashFiles('mix.lock') }} + key: ${{ runner.os }}-02-build-${{ hashFiles('mix.lock') }} restore-keys: | - ${{ runner.os }}-01-build-${{ hashFiles('mix.lock') }} - ${{ runner.os }}-01-build- + ${{ runner.os }}-02-build-${{ hashFiles('mix.lock') }} + ${{ runner.os }}-02-build- - name: Instal Mix and Rebar run: mix local.hex --force && mix local.rebar --force - name: Install dependencies diff --git a/lib/ravix_ecto.ex b/lib/ravix_ecto.ex index 9d32d2d..4b4f988 100644 --- a/lib/ravix_ecto.ex +++ b/lib/ravix_ecto.ex @@ -53,7 +53,7 @@ defmodule Ravix.Ecto.Adapter do defdelegate update(repo, meta, fields, filters, returning, opts), to: @schema - defdelegate delete(adapter_meta, schema_meta, filters, options), to: @schema + defdelegate delete(adapter_meta, schema_meta, filters, returning, options), to: @schema defdelegate storage_up(opts), to: @storage diff --git a/lib/ravix_ecto/adapter.ex b/lib/ravix_ecto/adapter.ex index bf77dbd..aeb2a2c 100644 --- a/lib/ravix_ecto/adapter.ex +++ b/lib/ravix_ecto/adapter.ex @@ -67,16 +67,25 @@ defmodule Ravix.Ecto.Planner do [type] end + defp load_time(nil), do: {:ok, nil} defp load_time(time), do: Time.from_iso8601(time) + defp load_date(nil), do: {:ok, nil} + defp load_date(date) do date |> Date.from_iso8601() end + defp load_naive_datetime(nil) do + {:ok, nil} + end + defp load_naive_datetime(datetime) when is_bitstring(datetime) do {:ok, NaiveDateTime.from_iso8601!(datetime)} end + defp load_datetime(nil), do: {:ok, nil} + defp load_datetime(datetime) when is_bitstring(datetime) do {:ok, utc_date_time, _} = DateTime.from_iso8601(datetime) {:ok, utc_date_time} @@ -90,6 +99,10 @@ defmodule Ravix.Ecto.Planner do {:ok, map} end + defp load_binary(nil, _) do + {:ok, nil} + end + defp load_binary(binary, :ecto_uuid) do Ecto.UUID.dump(binary) end @@ -111,6 +124,12 @@ defmodule Ravix.Ecto.Planner do {:ok, id} end + defp load_id(nil) do + {:ok, nil} + end + + def load_decimal(nil), do: {:ok, nil} + def load_decimal(decimal) do Decimal.cast(decimal) end @@ -129,10 +148,13 @@ defmodule Ravix.Ecto.Planner do def dumpers(:decimal, type), do: [type, &dump_decimal/1] def dumpers(_base, type), do: [type] + defp dump_time(nil), do: {:ok, nil} defp dump_time({h, m, s, _}), do: Time.from_erl({h, m, s}) defp dump_time(%Time{} = time), do: {:ok, time} defp dump_time(_), do: :error + defp dump_date(nil), do: {:ok, nil} + defp dump_date({_, _, _} = date) do dt = {date, {0, 0, 0}} @@ -146,6 +168,8 @@ defmodule Ravix.Ecto.Planner do {:ok, date} end + defp dump_utc_datetime(nil), do: {:ok, nil} + defp dump_utc_datetime({{_, _, _} = date, {h, m, s, ms}}) do datetime = {date, {h, m, s}} @@ -168,6 +192,8 @@ defmodule Ravix.Ecto.Planner do {:ok, datetime} end + defp dump_naive_datetime(nil), do: {:ok, nil} + defp dump_naive_datetime({{_, _, _} = date, {h, m, s, ms}}) do datetime = {date, {h, m, s}} @@ -193,6 +219,8 @@ defmodule Ravix.Ecto.Planner do {:ok, datetime} end + defp dump_binary(nil, _), do: {:ok, nil} + defp dump_binary(binary, :ecto_uuid) when is_binary(binary) do Ecto.UUID.load(binary) end @@ -201,14 +229,20 @@ defmodule Ravix.Ecto.Planner do {:ok, Enum.join(for <>, do: <>)} end + defp dump_objectid(nil), do: {:ok, nil} + defp dump_objectid(objectid) do {:ok, objectid} end + defp dump_id(nil), do: {:ok, nil} + defp dump_id(id) when is_integer(id) do {:ok, id} end + def dump_decimal(nil), do: {:ok, nil} + def dump_decimal(decimal) when is_number(decimal) do {:ok, Integer.to_string(decimal)} end diff --git a/lib/ravix_ecto/schema.ex b/lib/ravix_ecto/schema.ex index 2a84995..c7c88b5 100644 --- a/lib/ravix_ecto/schema.ex +++ b/lib/ravix_ecto/schema.ex @@ -63,7 +63,7 @@ defmodule Ravix.Ecto.Schema do end @impl Ecto.Adapter.Schema - def delete(adapter_meta, %{schema: schema}, filters, _options) do + def delete(adapter_meta, %{schema: schema}, filters, _returning, _options) do pk = primary_key(schema) case Executor.delete_one(adapter_meta, filters, pk) do @@ -74,9 +74,10 @@ defmodule Ravix.Ecto.Schema do @impl Ecto.Adapter.Schema def autogenerate(:binary_id), do: UUID.uuid4() - def autogenerate(:embed_id),do: UUID.uuid4() - def autogenerate(:id), do: raise "[RAVIX-ECTO] RavenDB does not support auto-generated integer ids!" + def autogenerate(:embed_id), do: UUID.uuid4() + def autogenerate(:id), + do: raise("[RAVIX-ECTO] RavenDB does not support auto-generated integer ids!") defp returning_fields_for_list(_adapter_meta, _schema_meta, _result, [], _primary_key, _opts), do: nil diff --git a/mix.lock b/mix.lock index edadf3a..e9772a9 100644 --- a/mix.lock +++ b/mix.lock @@ -1,49 +1,49 @@ %{ "assertions": {:hex, :assertions, "0.19.0", "f177fcc22b55df6a41a58b151e430d189d0a1083dae3240522503dedaf8e1174", [:mix], [], "hexpm", "759bdbf977fe3e2d2b79f8a65d8674f29ac757781136a6cb4adf88f1574af1d8"}, - "bunt": {:hex, :bunt, "0.2.1", "e2d4792f7bc0ced7583ab54922808919518d0e57ee162901a16a1b6664ef3b14", [:mix], [], "hexpm", "a330bfb4245239787b15005e66ae6845c9cd524a288f0d141c148b02603777a5"}, + "bunt": {:hex, :bunt, "1.0.0", "081c2c665f086849e6d57900292b3a161727ab40431219529f13c4ddcf3e7a44", [:mix], [], "hexpm", "dc5f86aa08a5f6fa6b8096f0735c4e76d54ae5c9fa2c143e5a1fc7c1cd9bb6b5"}, "castore": {:hex, :castore, "0.1.22", "4127549e411bedd012ca3a308dede574f43819fe9394254ca55ab4895abfa1a2", [:mix], [], "hexpm", "c17576df47eb5aa1ee40cc4134316a99f5cad3e215d5c77b8dd3cfef12a22cac"}, - "certifi": {:hex, :certifi, "2.9.0", "6f2a475689dd47f19fb74334859d460a2dc4e3252a3324bd2111b8f0429e7e21", [:rebar3], [], "hexpm", "266da46bdb06d6c6d35fde799bcb28d36d985d424ad7c08b5bb48f5b5cdd4641"}, + "certifi": {:hex, :certifi, "2.12.0", "2d1cca2ec95f59643862af91f001478c9863c2ac9cb6e2f89780bfd8de987329", [:rebar3], [], "hexpm", "ee68d85df22e554040cdb4be100f33873ac6051387baf6a8f6ce82272340ff1c"}, "combine": {:hex, :combine, "0.10.0", "eff8224eeb56498a2af13011d142c5e7997a80c8f5b97c499f84c841032e429f", [:mix], [], "hexpm", "1b1dbc1790073076580d0d1d64e42eae2366583e7aecd455d1215b0d16f2451b"}, - "credo": {:hex, :credo, "1.7.0", "6119bee47272e85995598ee04f2ebbed3e947678dee048d10b5feca139435f75", [:mix], [{:bunt, "~> 0.2.1", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2.8", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "6839fcf63d1f0d1c0f450abc8564a57c43d644077ab96f2934563e68b8a769d7"}, + "credo": {:hex, :credo, "1.7.3", "05bb11eaf2f2b8db370ecaa6a6bda2ec49b2acd5e0418bc106b73b07128c0436", [:mix], [{:bunt, "~> 0.2.1 or ~> 1.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "35ea675a094c934c22fb1dca3696f3c31f2728ae6ef5a53b5d648c11180a4535"}, "decimal": {:hex, :decimal, "2.1.1", "5611dca5d4b2c3dd497dec8f68751f1f1a54755e8ed2a966c2633cf885973ad6", [:mix], [], "hexpm", "53cfe5f497ed0e7771ae1a475575603d77425099ba5faef9394932b35020ffcc"}, - "dialyxir": {:hex, :dialyxir, "1.3.0", "fd1672f0922b7648ff9ce7b1b26fcf0ef56dda964a459892ad15f6b4410b5284", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "00b2a4bcd6aa8db9dcb0b38c1225b7277dca9bc370b6438715667071a304696f"}, + "dialyxir": {:hex, :dialyxir, "1.4.3", "edd0124f358f0b9e95bfe53a9fcf806d615d8f838e2202a9f430d59566b6b53b", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "bf2cfb75cd5c5006bec30141b131663299c661a864ec7fbbc72dfa557487a986"}, "docsh": {:hex, :docsh, "0.7.2", "f893d5317a0e14269dd7fe79cf95fb6b9ba23513da0480ec6e77c73221cae4f2", [:rebar3], [{:providers, "1.8.1", [hex: :providers, repo: "hexpm", optional: false]}], "hexpm", "4e7db461bb07540d2bc3d366b8513f0197712d0495bb85744f367d3815076134"}, - "earmark_parser": {:hex, :earmark_parser, "1.4.33", "3c3fd9673bb5dcc9edc28dd90f50c87ce506d1f71b70e3de69aa8154bc695d44", [:mix], [], "hexpm", "2d526833729b59b9fdb85785078697c72ac5e5066350663e5be6a1182da61b8f"}, - "ecto": {:hex, :ecto, "3.10.3", "eb2ae2eecd210b4eb8bece1217b297ad4ff824b4384c0e3fdd28aaf96edd6135", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "44bec74e2364d491d70f7e42cd0d690922659d329f6465e89feb8a34e8cd3433"}, + "earmark_parser": {:hex, :earmark_parser, "1.4.39", "424642f8335b05bb9eb611aa1564c148a8ee35c9c8a8bba6e129d51a3e3c6769", [:mix], [], "hexpm", "06553a88d1f1846da9ef066b87b57c6f605552cfbe40d20bd8d59cc6bde41944"}, + "ecto": {:hex, :ecto, "3.11.1", "4b4972b717e7ca83d30121b12998f5fcdc62ba0ed4f20fd390f16f3270d85c3e", [:mix], [{:decimal, "~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "ebd3d3772cd0dfcd8d772659e41ed527c28b2a8bde4b00fe03e0463da0f1983b"}, "elixir_make": {:hex, :elixir_make, "0.7.7", "7128c60c2476019ed978210c245badf08b03dbec4f24d05790ef791da11aa17c", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}], "hexpm", "5bc19fff950fad52bbe5f211b12db9ec82c6b34a9647da0c2224b8b8464c7e6c"}, - "elixir_sense": {:git, "https://github.com/elixir-lsp/elixir_sense.git", "4c6941aa409607edb6c50879bf86333a485027ff", []}, + "elixir_sense": {:git, "https://github.com/elixir-lsp/elixir_sense.git", "94986932e76342ea6113f4baaaa0bd1a9d22a550", []}, "elixir_uuid": {:hex, :elixir_uuid, "1.2.1", "dce506597acb7e6b0daeaff52ff6a9043f5919a4c3315abb4143f0b00378c097", [:mix], [], "hexpm", "f7eba2ea6c3555cea09706492716b0d87397b88946e6380898c2889d68585752"}, "erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"}, - "ex_doc": {:hex, :ex_doc, "0.30.3", "bfca4d340e3b95f2eb26e72e4890da83e2b3a5c5b0e52607333bf5017284b063", [:mix], [{:earmark_parser, "~> 1.4.31", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "fbc8702046c1d25edf79de376297e608ac78cdc3a29f075484773ad1718918b6"}, + "ex_doc": {:hex, :ex_doc, "0.31.0", "06eb1dfd787445d9cab9a45088405593dd3bb7fe99e097eaa71f37ba80c7a676", [:mix], [{:earmark_parser, "~> 1.4.39", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.1", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "5350cafa6b7f77bdd107aa2199fe277acf29d739aba5aee7e865fc680c62a110"}, "ex_machina": {:hex, :ex_machina, "2.7.0", "b792cc3127fd0680fecdb6299235b4727a4944a09ff0fa904cc639272cd92dc7", [:mix], [{:ecto, "~> 2.2 or ~> 3.0", [hex: :ecto, repo: "hexpm", optional: true]}, {:ecto_sql, "~> 3.0", [hex: :ecto_sql, repo: "hexpm", optional: true]}], "hexpm", "419aa7a39bde11894c87a615c4ecaa52d8f107bbdd81d810465186f783245bf8"}, "excoveralls": {:hex, :excoveralls, "0.16.1", "0bd42ed05c7d2f4d180331a20113ec537be509da31fed5c8f7047ce59ee5a7c5", [:mix], [{:hackney, "~> 1.16", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "dae763468e2008cf7075a64cb1249c97cb4bc71e236c5c2b5e5cdf1cfa2bf138"}, - "expo": {:hex, :expo, "0.4.1", "1c61d18a5df197dfda38861673d392e642649a9cef7694d2f97a587b2cfb319b", [:mix], [], "hexpm", "2ff7ba7a798c8c543c12550fa0e2cbc81b95d4974c65855d8d15ba7b37a1ce47"}, - "file_system": {:hex, :file_system, "0.2.10", "fb082005a9cd1711c05b5248710f8826b02d7d1784e7c3451f9c1231d4fc162d", [:mix], [], "hexpm", "41195edbfb562a593726eda3b3e8b103a309b733ad25f3d642ba49696bf715dc"}, - "finch": {:hex, :finch, "0.16.0", "40733f02c89f94a112518071c0a91fe86069560f5dbdb39f9150042f44dcfb1a", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: false]}, {:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mint, "~> 1.3", [hex: :mint, repo: "hexpm", optional: false]}, {:nimble_options, "~> 0.4 or ~> 1.0", [hex: :nimble_options, repo: "hexpm", optional: false]}, {:nimble_pool, "~> 0.2.6 or ~> 1.0", [hex: :nimble_pool, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "f660174c4d519e5fec629016054d60edd822cdfe2b7270836739ac2f97735ec5"}, + "expo": {:hex, :expo, "0.5.1", "249e826a897cac48f591deba863b26c16682b43711dd15ee86b92f25eafd96d9", [:mix], [], "hexpm", "68a4233b0658a3d12ee00d27d37d856b1ba48607e7ce20fd376958d0ba6ce92b"}, + "file_system": {:hex, :file_system, "1.0.0", "b689cc7dcee665f774de94b5a832e578bd7963c8e637ef940cd44327db7de2cd", [:mix], [], "hexpm", "6752092d66aec5a10e662aefeed8ddb9531d79db0bc145bb8c40325ca1d8536d"}, + "finch": {:hex, :finch, "0.17.0", "17d06e1d44d891d20dbd437335eebe844e2426a0cd7e3a3e220b461127c73f70", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: false]}, {:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mint, "~> 1.3", [hex: :mint, repo: "hexpm", optional: false]}, {:nimble_options, "~> 0.4 or ~> 1.0", [hex: :nimble_options, repo: "hexpm", optional: false]}, {:nimble_pool, "~> 0.2.6 or ~> 1.0", [hex: :nimble_pool, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "8d014a661bb6a437263d4b5abf0bcbd3cf0deb26b1e8596f2a271d22e48934c7"}, "getopt": {:hex, :getopt, "1.0.1", "c73a9fa687b217f2ff79f68a3b637711bb1936e712b521d8ce466b29cbf7808a", [:rebar3], [], "hexpm", "53e1ab83b9ceb65c9672d3e7a35b8092e9bdc9b3ee80721471a161c10c59959c"}, - "gettext": {:hex, :gettext, "0.22.3", "c8273e78db4a0bb6fba7e9f0fd881112f349a3117f7f7c598fa18c66c888e524", [:mix], [{:expo, "~> 0.4.0", [hex: :expo, repo: "hexpm", optional: false]}], "hexpm", "935f23447713954a6866f1bb28c3a878c4c011e802bcd68a726f5e558e4b64bd"}, + "gettext": {:hex, :gettext, "0.24.0", "6f4d90ac5f3111673cbefc4ebee96fe5f37a114861ab8c7b7d5b30a1108ce6d8", [:mix], [{:expo, "~> 0.5.1", [hex: :expo, repo: "hexpm", optional: false]}], "hexpm", "bdf75cdfcbe9e4622dd18e034b227d77dd17f0f133853a1c73b97b3d6c770e8b"}, "git_cli": {:hex, :git_cli, "0.3.0", "a5422f9b95c99483385b976f5d43f7e8233283a47cda13533d7c16131cb14df5", [:mix], [], "hexpm", "78cb952f4c86a41f4d3511f1d3ecb28edb268e3a7df278de2faa1bd4672eaf9b"}, "gradient": {:git, "https://github.com/esl/gradient.git", "33e13fbe1ff60a49abdc638d76b77effddf3cc45", []}, "gradient_macros": {:git, "https://github.com/esl/gradient_macros.git", "3bce2146bf0cdf380f773c40e2b7bd6558ab6de8", [ref: "3bce214"]}, "gradualizer": {:git, "https://github.com/josefs/Gradualizer.git", "3021d29d82741399d131e3be38d2a8db79d146d4", [tag: "0.3.0"]}, - "hackney": {:hex, :hackney, "1.18.1", "f48bf88f521f2a229fc7bae88cf4f85adc9cd9bcf23b5dc8eb6a1788c662c4f6", [:rebar3], [{:certifi, "~> 2.9.0", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "~> 6.1.0", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "~> 1.0.0", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "~> 1.1", [hex: :mimerl, repo: "hexpm", optional: false]}, {:parse_trans, "3.3.1", [hex: :parse_trans, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "~> 1.1.0", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}, {:unicode_util_compat, "~> 0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "a4ecdaff44297e9b5894ae499e9a070ea1888c84afdd1fd9b7b2bc384950128e"}, + "hackney": {:hex, :hackney, "1.20.1", "8d97aec62ddddd757d128bfd1df6c5861093419f8f7a4223823537bad5d064e2", [:rebar3], [{:certifi, "~> 2.12.0", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "~> 6.1.0", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "~> 1.0.0", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "~> 1.1", [hex: :mimerl, repo: "hexpm", optional: false]}, {:parse_trans, "3.4.1", [hex: :parse_trans, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "~> 1.1.0", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}, {:unicode_util_compat, "~> 0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "fe9094e5f1a2a2c0a7d10918fee36bfec0ec2a979994cff8cfe8058cd9af38e3"}, "hpax": {:hex, :hpax, "0.1.2", "09a75600d9d8bbd064cdd741f21fc06fc1f4cf3d0fcc335e5aa19be1a7235c84", [:mix], [], "hexpm", "2c87843d5a23f5f16748ebe77969880e29809580efdaccd615cd3bed628a8c13"}, "idna": {:hex, :idna, "6.1.1", "8a63070e9f7d0c62eb9d9fcb360a7de382448200fbbd1b106cc96d3d8099df8d", [:rebar3], [{:unicode_util_compat, "~> 0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "92376eb7894412ed19ac475e4a86f7b413c1b9fbb5bd16dccd57934157944cea"}, "inflex": {:hex, :inflex, "2.1.0", "a365cf0821a9dacb65067abd95008ca1b0bb7dcdd85ae59965deef2aa062924c", [:mix], [], "hexpm", "14c17d05db4ee9b6d319b0bff1bdf22aa389a25398d1952c7a0b5f3d93162dd8"}, "jason": {:hex, :jason, "1.4.1", "af1504e35f629ddcdd6addb3513c3853991f694921b1b9368b0bd32beb9f1b63", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "fbb01ecdfd565b56261302f7e1fcc27c4fb8f32d56eab74db621fc154604a7a1"}, "jaxon": {:hex, :jaxon, "2.0.8", "00951a79d354260e28d7e36f956c3de94818124768a4b22e0fc55559d1b3bfe7", [:make, :mix], [{:elixir_make, "~> 0.4", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "74532853b1126609615ea98f0ceb5009e70465ca98027afbbd8ed314d887e82d"}, - "makeup": {:hex, :makeup, "1.1.0", "6b67c8bc2882a6b6a445859952a602afc1a41c2e08379ca057c0f525366fc3ca", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "0a45ed501f4a8897f580eabf99a2e5234ea3e75a4373c8a52824f6e873be57a6"}, + "makeup": {:hex, :makeup, "1.1.1", "fa0bc768698053b2b3869fa8a62616501ff9d11a562f3ce39580d60860c3a55e", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "5dc62fbdd0de44de194898b6710692490be74baa02d9d108bc29f007783b0b48"}, "makeup_elixir": {:hex, :makeup_elixir, "0.16.1", "cc9e3ca312f1cfeccc572b37a09980287e243648108384b97ff2b76e505c3555", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "e127a341ad1b209bd80f7bd1620a15693a9908ed780c3b763bccf7d200c767c6"}, - "makeup_erlang": {:hex, :makeup_erlang, "0.1.2", "ad87296a092a46e03b7e9b0be7631ddcf64c790fa68a9ef5323b6cbb36affc72", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "f3f5a1ca93ce6e092d92b6d9c049bcda58a3b617a8d888f8e7231c85630e8108"}, + "makeup_erlang": {:hex, :makeup_erlang, "0.1.3", "d684f4bac8690e70b06eb52dad65d26de2eefa44cd19d64a8095e1417df7c8fd", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "b78dc853d2e670ff6390b605d807263bf606da3c82be37f9d7f68635bd886fc9"}, "mappable": {:hex, :mappable, "0.2.4", "3038564db78bbde442100d9252aac484be746612bc74b333fbeaeffec8087efa", [:mix], [], "hexpm", "188d9291ca5eec10af61420b6738ef69244b7d7ec6dc98f7f4aa7a4e21f1a8b5"}, "metrics": {:hex, :metrics, "1.0.1", "25f094dea2cda98213cecc3aeff09e940299d950904393b2a29d191c346a8486", [:rebar3], [], "hexpm", "69b09adddc4f74a40716ae54d140f93beb0fb8978d8636eaded0c31b6f099f16"}, "mime": {:hex, :mime, "2.0.5", "dc34c8efd439abe6ae0343edbb8556f4d63f178594894720607772a041b04b02", [:mix], [], "hexpm", "da0d64a365c45bc9935cc5c8a7fc5e49a0e0f9932a761c55d6c52b142780a05c"}, "mimerl": {:hex, :mimerl, "1.2.0", "67e2d3f571088d5cfd3e550c383094b47159f3eee8ffa08e64106cdf5e981be3", [:rebar3], [], "hexpm", "f278585650aa581986264638ebf698f8bb19df297f66ad91b18910dfc6e19323"}, - "mint": {:hex, :mint, "1.5.1", "8db5239e56738552d85af398798c80648db0e90f343c8469f6c6d8898944fb6f", [:mix], [{:castore, "~> 0.1.0 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:hpax, "~> 0.1.1", [hex: :hpax, repo: "hexpm", optional: false]}], "hexpm", "4a63e1e76a7c3956abd2c72f370a0d0aecddc3976dea5c27eccbecfa5e7d5b1e"}, + "mint": {:hex, :mint, "1.5.2", "4805e059f96028948870d23d7783613b7e6b0e2fb4e98d720383852a760067fd", [:mix], [{:castore, "~> 0.1.0 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:hpax, "~> 0.1.1", [hex: :hpax, repo: "hexpm", optional: false]}], "hexpm", "d77d9e9ce4eb35941907f1d3df38d8f750c357865353e21d335bdcdf6d892a02"}, "morphix": {:hex, :morphix, "0.8.1", "5342f2baf8b3385e63a1d4ef7586f1d6f89b66e3ae9615fe3b1a85e5e3ff0ddb", [:mix], [], "hexpm", "e2cfd750dcc25c48b1dd97304fcb167f4ccaefc133fa2b9b4cb8619678fac1e3"}, "nebulex": {:hex, :nebulex, "2.5.2", "2d358813ccb2eeea525e3a29c270ad123d3337e97ed9159d9113cf128108bd4c", [:mix], [{:decorator, "~> 1.4", [hex: :decorator, repo: "hexpm", optional: true]}, {:shards, "~> 1.1", [hex: :shards, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: true]}], "hexpm", "61a122302cf42fa61eca22515b1df21aaaa1b98cf462f6dd0998de9797aaf1c7"}, - "nimble_options": {:hex, :nimble_options, "1.0.2", "92098a74df0072ff37d0c12ace58574d26880e522c22801437151a159392270e", [:mix], [], "hexpm", "fd12a8db2021036ce12a309f26f564ec367373265b53e25403f0ee697380f1b8"}, - "nimble_parsec": {:hex, :nimble_parsec, "1.3.1", "2c54013ecf170e249e9291ed0a62e5832f70a476c61da16f6aac6dca0189f2af", [:mix], [], "hexpm", "2682e3c0b2eb58d90c6375fc0cc30bc7be06f365bf72608804fb9cffa5e1b167"}, + "nimble_options": {:hex, :nimble_options, "1.1.0", "3b31a57ede9cb1502071fade751ab0c7b8dbe75a9a4c2b5bbb0943a690b63172", [:mix], [], "hexpm", "8bbbb3941af3ca9acc7835f5655ea062111c9c27bcac53e004460dfd19008a99"}, + "nimble_parsec": {:hex, :nimble_parsec, "1.4.0", "51f9b613ea62cfa97b25ccc2c1b4216e81df970acd8e16e8d1bdc58fef21370d", [:mix], [], "hexpm", "9c565862810fb383e9838c1dd2d7d2c437b3d13b267414ba6af33e50d2d1cf28"}, "nimble_pool": {:hex, :nimble_pool, "1.0.0", "5eb82705d138f4dd4423f69ceb19ac667b3b492ae570c9f5c900bb3d2f50a847", [:mix], [], "hexpm", "80be3b882d2d351882256087078e1b1952a28bf98d0a287be87e4a24a710b67a"}, "ok": {:hex, :ok, "2.3.0", "0a3d513ec9038504dc5359d44e14fc14ef59179e625563a1a144199cdc3a6d30", [:mix], [], "hexpm", "f0347b3f8f115bf347c704184b33cf084f2943771273f2b98a3707a5fa43c4d5"}, "opentelemetry": {:hex, :opentelemetry, "1.1.2", "77ba2fd2fee67bebde590851a4afeda45b3f298310aa410a2a3804b364cb598a", [:rebar3], [{:opentelemetry_api, "~> 1.1", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}], "hexpm", "5c60be189d6aed64a9fd17055f72c93eab144be441e625276c3c95533e6bb4c7"}, @@ -51,10 +51,10 @@ "opentelemetry_semantic_conventions": {:hex, :opentelemetry_semantic_conventions, "0.1.0", "0a7463c0ec4541d9c8e09ee99bd7b5480fa6f90f40313a6d071fd7521b5a712f", [:mix, :rebar3], [], "hexpm", "eccf41bc7afec299484075aff570bf504a2f7e5c38fbcdaceb33a6d6b901448d"}, "opentelemetry_telemetry": {:hex, :opentelemetry_telemetry, "1.0.0", "d5982a319e725fcd2305b306b65c18a86afdcf7d96821473cf0649ff88877615", [:mix, :rebar3], [{:opentelemetry_api, "~> 1.0", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:telemetry_registry, "~> 0.3.0", [hex: :telemetry_registry, repo: "hexpm", optional: false]}], "hexpm", "3401d13a1d4b7aa941a77e6b3ec074f0ae77f83b5b2206766ce630123a9291a9"}, "opentelemetry_tesla": {:hex, :opentelemetry_tesla, "2.1.0", "e525aa59147d09748c347764ad5681d8465568c223518d38c615abd70cff6f58", [:mix], [{:opentelemetry_api, "~> 1.0", [hex: :opentelemetry_api, repo: "hexpm", optional: false]}, {:opentelemetry_semantic_conventions, "~> 0.1.0", [hex: :opentelemetry_semantic_conventions, repo: "hexpm", optional: false]}, {:opentelemetry_telemetry, "~> 1.0.0", [hex: :opentelemetry_telemetry, repo: "hexpm", optional: false]}, {:tesla, "~> 1.4", [hex: :tesla, repo: "hexpm", optional: false]}], "hexpm", "07105fe13050247ec4d41218b02cbc87ac7d42dbec78fef224feb7478f4672e2"}, - "parse_trans": {:hex, :parse_trans, "3.3.1", "16328ab840cc09919bd10dab29e431da3af9e9e7e7e6f0089dd5a2d2820011d8", [:rebar3], [], "hexpm", "07cd9577885f56362d414e8c4c4e6bdf10d43a8767abb92d24cbe8b24c54888b"}, + "parse_trans": {:hex, :parse_trans, "3.4.1", "6e6aa8167cb44cc8f39441d05193be6e6f4e7c2946cb2759f015f8c56b76e5ff", [:rebar3], [], "hexpm", "620a406ce75dada827b82e453c19cf06776be266f5a67cff34e1ef2cbb60e49a"}, "poolboy": {:hex, :poolboy, "1.5.2", "392b007a1693a64540cead79830443abf5762f5d30cf50bc95cb2c1aaafa006b", [:rebar3], [], "hexpm", "dad79704ce5440f3d5a3681c8590b9dc25d1a561e8f5a9c995281012860901e3"}, "providers": {:hex, :providers, "1.8.1", "70b4197869514344a8a60e2b2a4ef41ca03def43cfb1712ecf076a0f3c62f083", [:rebar3], [{:getopt, "1.0.1", [hex: :getopt, repo: "hexpm", optional: false]}], "hexpm", "e45745ade9c476a9a469ea0840e418ab19360dc44f01a233304e118a44486ba0"}, - "ravix": {:hex, :ravix, "0.9.2", "eabddd15180494525d274ac7e0f7420fc8e71acf319c88e8934d1abaa01899f0", [:mix], [{:castore, "~> 0.1", [hex: :castore, repo: "hexpm", optional: false]}, {:elixir_uuid, "~> 1.2", [hex: :elixir_uuid, repo: "hexpm", optional: false]}, {:finch, "~> 0.13", [hex: :finch, repo: "hexpm", optional: false]}, {:inflex, "~> 2.1", [hex: :inflex, repo: "hexpm", optional: false]}, {:jason, "~> 1.3", [hex: :jason, repo: "hexpm", optional: false]}, {:jaxon, "~> 2.0", [hex: :jaxon, repo: "hexpm", optional: false]}, {:mappable, "~> 0.2", [hex: :mappable, repo: "hexpm", optional: false]}, {:morphix, "~> 0.8", [hex: :morphix, repo: "hexpm", optional: false]}, {:nebulex, "~> 2.5", [hex: :nebulex, repo: "hexpm", optional: false]}, {:ok, "~> 2.3", [hex: :ok, repo: "hexpm", optional: false]}, {:retry, "~> 0.16", [hex: :retry, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.1", [hex: :telemetry, repo: "hexpm", optional: false]}, {:timex, "~> 3.7", [hex: :timex, repo: "hexpm", optional: false]}, {:tzdata, "~> 1.1", [hex: :tzdata, repo: "hexpm", optional: false]}], "hexpm", "8d9e132217c06df51199f5e6661c2acb0f857395f87f05f7afa6dda2ffda1ceb"}, + "ravix": {:hex, :ravix, "0.10.0", "914c14b97d088f021019958e84036377470f7e30db157107b8e88cc36d6547e2", [:mix], [{:castore, "~> 0.1", [hex: :castore, repo: "hexpm", optional: false]}, {:elixir_uuid, "~> 1.2", [hex: :elixir_uuid, repo: "hexpm", optional: false]}, {:finch, "~> 0.13", [hex: :finch, repo: "hexpm", optional: false]}, {:inflex, "~> 2.1", [hex: :inflex, repo: "hexpm", optional: false]}, {:jason, "~> 1.3", [hex: :jason, repo: "hexpm", optional: false]}, {:jaxon, "~> 2.0", [hex: :jaxon, repo: "hexpm", optional: false]}, {:mappable, "~> 0.2", [hex: :mappable, repo: "hexpm", optional: false]}, {:morphix, "~> 0.8", [hex: :morphix, repo: "hexpm", optional: false]}, {:nebulex, "~> 2.5", [hex: :nebulex, repo: "hexpm", optional: false]}, {:ok, "~> 2.3", [hex: :ok, repo: "hexpm", optional: false]}, {:retry, "~> 0.16", [hex: :retry, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.1", [hex: :telemetry, repo: "hexpm", optional: false]}, {:timex, "~> 3.7", [hex: :timex, repo: "hexpm", optional: false]}, {:tzdata, "~> 1.1", [hex: :tzdata, repo: "hexpm", optional: false]}], "hexpm", "434efaef5745e504c9575b7b960a0c9e9af6a5e820b362d34fbaa04938ca0400"}, "retry": {:hex, :retry, "0.18.0", "dc58ebe22c95aa00bc2459f9e0c5400e6005541cf8539925af0aa027dc860543", [:mix], [], "hexpm", "9483959cc7bf69c9e576d9dfb2b678b71c045d3e6f39ab7c9aa1489df4492d73"}, "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.7", "354c321cf377240c7b8716899e182ce4890c5938111a1296add3ec74cf1715df", [:make, :mix, :rebar3], [], "hexpm", "fe4c190e8f37401d30167c8c405eda19469f34577987c76dde613e838bbc67f8"}, "telemetry": {:hex, :telemetry, "1.2.1", "68fdfe8d8f05a8428483a97d7aab2f268aaff24b49e0f599faa091f1d4e7f61c", [:rebar3], [], "hexpm", "dad9ce9d8effc621708f99eac538ef1cbe05d6a874dd741de2e689c47feafed5"}, diff --git a/test/ecto/repo_test.exs b/test/ecto/repo_test.exs index 5527046..83ea212 100644 --- a/test/ecto/repo_test.exs +++ b/test/ecto/repo_test.exs @@ -23,7 +23,7 @@ defmodule Ecto.Integration.RepoTest do describe "Queries without associations" do test "should fetch all with in clause" do - TestRepo.insert!(%Post{title: "hello"}) + TestRepo.insert!(%Post{title: "hello", cost: 10}) assert_raise Ecto.Query.CastError, fn -> TestRepo.all(from(p in Post, where: p.title in ^nil)) @@ -595,7 +595,10 @@ defmodule Ecto.Integration.RepoTest do ) assert {1, _} = - TestRepo.insert_all(Post, source, conflict_target: [:id], on_conflict: :replace_all) + TestRepo.insert_all(Post, source, + conflict_target: [:id], + on_conflict: :replace_all + ) expected_id = id + 1 expected_title = "A generic title suffix #{id}"