Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
@@ -22,15 +22,15 @@ defmodule Mongo.Ecto.Mixfile do
#
# Type `mix help compile.app` for more information.
def application do
[applications: [:ecto, :mongodb_driver, :logger, :telemetry]]
[extra_applications: [:logger]]
end

defp deps do
[
{:credo, "~> 1.5.6", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.1.0", only: :dev, runtime: false},
{:ecto, "~> 3.12"},
{:ex_doc, ">= 0.0.0", only: :dev, runtime: false},
{:ex_doc, ">= 0.0.0", only: :docs, runtime: false},
{:excoveralls, "~> 0.16", only: :test},
{:mongodb_driver, "~> 1.4"},
{:telemetry, ">= 0.4.0"}

Unchanged files with check annotations Beta

defmodule Ecto.Integration.TypeTest do
use Ecto.Integration.Case, async: Application.get_env(:ecto, :async_integration_tests, true)

Check warning on line 2 in test/ecto_test/type_test.exs

GitHub Actions / test (5.0, 24.3.4.10, 1.14.3, server)

Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead

Check warning on line 2 in test/ecto_test/type_test.exs

GitHub Actions / test (6.0, 24.3.4.10, 1.14.3, server)

Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead

Check warning on line 2 in test/ecto_test/type_test.exs

GitHub Actions / test (7.0, 24.3.4.10, 1.14.3, server)

Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead

Check warning on line 2 in test/ecto_test/type_test.exs

GitHub Actions / test (7.0, 24.3.4.10, 1.14.3, replica_set)

Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead

Check warning on line 2 in test/ecto_test/type_test.exs

GitHub Actions / test (5.0, 24.3.4.10, 1.14.3, replica_set)

Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead

Check warning on line 2 in test/ecto_test/type_test.exs

GitHub Actions / test (6.0, 24.3.4.10, 1.14.3, replica_set)

Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead

Check warning on line 2 in test/ecto_test/type_test.exs

GitHub Actions / test (6.0, 24.3.4.10, 1.14.3, server)

Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead

Check warning on line 2 in test/ecto_test/type_test.exs

GitHub Actions / test (7.0, 24.3.4.10, 1.14.3, server)

Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead

Check warning on line 2 in test/ecto_test/type_test.exs

GitHub Actions / test (5.0, 24.3.4.10, 1.14.3, server)

Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead

Check warning on line 2 in test/ecto_test/type_test.exs

GitHub Actions / test (6.0, 24.3.4.10, 1.14.3, replica_set)

Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead

Check warning on line 2 in test/ecto_test/type_test.exs

GitHub Actions / test (7.0, 24.3.4.10, 1.14.3, replica_set)

Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead

Check warning on line 2 in test/ecto_test/type_test.exs

GitHub Actions / test (5.0, 24.3.4.10, 1.14.3, replica_set)

Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead
alias Ecto.Integration.{
Custom,
assert [true] = TestRepo.all(from p in Post, where: p.public == true, select: p.public)
# Binaries
assert [^blob] = TestRepo.all(from p in Post, where: p.blob == <<0, 1>>, select: p.blob)

Check warning on line 61 in test/ecto_test/type_test.exs

GitHub Actions / test (5.0, 22.3.4.26, 1.12.3, server)

this check/guard will always yield the same result

Check warning on line 61 in test/ecto_test/type_test.exs

GitHub Actions / test (6.0, 22.3.4.26, 1.12.3, server)

this check/guard will always yield the same result

Check warning on line 61 in test/ecto_test/type_test.exs

GitHub Actions / test (5.0, 24.3.4.10, 1.14.3, server)

this check/guard will always yield the same result

Check warning on line 61 in test/ecto_test/type_test.exs

GitHub Actions / test (6.0, 24.3.4.10, 1.14.3, server)

this check/guard will always yield the same result

Check warning on line 61 in test/ecto_test/type_test.exs

GitHub Actions / test (7.0, 22.3.4.26, 1.12.3, server)

this check/guard will always yield the same result

Check warning on line 61 in test/ecto_test/type_test.exs

GitHub Actions / test (7.0, 24.3.4.10, 1.14.3, server)

this check/guard will always yield the same result

Check warning on line 61 in test/ecto_test/type_test.exs

GitHub Actions / test (7.0, 23.3.4.18, 1.13.4, server)

this check/guard will always yield the same result

Check warning on line 61 in test/ecto_test/type_test.exs

GitHub Actions / test (6.0, 23.3.4.18, 1.13.4, server)

this check/guard will always yield the same result

Check warning on line 61 in test/ecto_test/type_test.exs

GitHub Actions / test (5.0, 22.3.4.26, 1.12.3, replica_set)

this check/guard will always yield the same result

Check warning on line 61 in test/ecto_test/type_test.exs

GitHub Actions / test (7.0, 24.3.4.10, 1.14.3, replica_set)

this check/guard will always yield the same result

Check warning on line 61 in test/ecto_test/type_test.exs

GitHub Actions / test (5.0, 24.3.4.10, 1.14.3, replica_set)

this check/guard will always yield the same result

Check warning on line 61 in test/ecto_test/type_test.exs

GitHub Actions / test (7.0, 23.3.4.18, 1.13.4, replica_set)

this check/guard will always yield the same result

Check warning on line 61 in test/ecto_test/type_test.exs

GitHub Actions / test (6.0, 22.3.4.26, 1.12.3, replica_set)

this check/guard will always yield the same result

Check warning on line 61 in test/ecto_test/type_test.exs

GitHub Actions / test (5.0, 23.3.4.18, 1.13.4, server)

this check/guard will always yield the same result

Check warning on line 61 in test/ecto_test/type_test.exs

GitHub Actions / test (6.0, 24.3.4.10, 1.14.3, replica_set)

this check/guard will always yield the same result

Check warning on line 61 in test/ecto_test/type_test.exs

GitHub Actions / test (6.0, 23.3.4.18, 1.13.4, replica_set)

this check/guard will always yield the same result

Check warning on line 61 in test/ecto_test/type_test.exs

GitHub Actions / test (7.0, 22.3.4.26, 1.12.3, replica_set)

this check/guard will always yield the same result

Check warning on line 61 in test/ecto_test/type_test.exs

GitHub Actions / test (5.0, 23.3.4.18, 1.13.4, replica_set)

this check/guard will always yield the same result

Check warning on line 61 in test/ecto_test/type_test.exs

GitHub Actions / test (6.0, 24.3.4.10, 1.14.3, server)

this check/guard will always yield the same result

Check warning on line 61 in test/ecto_test/type_test.exs

GitHub Actions / test (7.0, 24.3.4.10, 1.14.3, server)

this check/guard will always yield the same result

Check warning on line 61 in test/ecto_test/type_test.exs

GitHub Actions / test (5.0, 24.3.4.10, 1.14.3, server)

this check/guard will always yield the same result

Check warning on line 61 in test/ecto_test/type_test.exs

GitHub Actions / test (5.0, 22.3.4.26, 1.12.3, server)

this check/guard will always yield the same result

Check warning on line 61 in test/ecto_test/type_test.exs

GitHub Actions / test (6.0, 22.3.4.26, 1.12.3, server)

this check/guard will always yield the same result

Check warning on line 61 in test/ecto_test/type_test.exs

GitHub Actions / test (7.0, 22.3.4.26, 1.12.3, server)

this check/guard will always yield the same result

Check warning on line 61 in test/ecto_test/type_test.exs

GitHub Actions / test (5.0, 23.3.4.18, 1.13.4, server)

this check/guard will always yield the same result

Check warning on line 61 in test/ecto_test/type_test.exs

GitHub Actions / test (7.0, 23.3.4.18, 1.13.4, server)

this check/guard will always yield the same result

Check warning on line 61 in test/ecto_test/type_test.exs

GitHub Actions / test (6.0, 23.3.4.18, 1.13.4, server)

this check/guard will always yield the same result

Check warning on line 61 in test/ecto_test/type_test.exs

GitHub Actions / test (6.0, 24.3.4.10, 1.14.3, replica_set)

this check/guard will always yield the same result

Check warning on line 61 in test/ecto_test/type_test.exs

GitHub Actions / test (7.0, 24.3.4.10, 1.14.3, replica_set)

this check/guard will always yield the same result

Check warning on line 61 in test/ecto_test/type_test.exs

GitHub Actions / test (5.0, 22.3.4.26, 1.12.3, replica_set)

this check/guard will always yield the same result

Check warning on line 61 in test/ecto_test/type_test.exs

GitHub Actions / test (7.0, 23.3.4.18, 1.13.4, replica_set)

this check/guard will always yield the same result

Check warning on line 61 in test/ecto_test/type_test.exs

GitHub Actions / test (6.0, 23.3.4.18, 1.13.4, replica_set)

this check/guard will always yield the same result

Check warning on line 61 in test/ecto_test/type_test.exs

GitHub Actions / test (6.0, 22.3.4.26, 1.12.3, replica_set)

this check/guard will always yield the same result

Check warning on line 61 in test/ecto_test/type_test.exs

GitHub Actions / test (7.0, 22.3.4.26, 1.12.3, replica_set)

this check/guard will always yield the same result

Check warning on line 61 in test/ecto_test/type_test.exs

GitHub Actions / test (5.0, 23.3.4.18, 1.13.4, replica_set)

this check/guard will always yield the same result

Check warning on line 61 in test/ecto_test/type_test.exs

GitHub Actions / test (5.0, 24.3.4.10, 1.14.3, replica_set)

this check/guard will always yield the same result
assert [^blob] = TestRepo.all(from p in Post, where: p.blob == ^blob, select: p.blob)
# UUID
query = "schema" |> where(foo: "abc") |> select([], true) |> normalize
assert_fields query, query: %{foo: "abc"}
query = "schema" |> where(foo: <<0, ?a, ?b, ?c>>) |> select([], true) |> normalize

Check warning on line 387 in test/mongo_ecto/normalized_query_new_test.exs

GitHub Actions / test (5.0, 22.3.4.26, 1.12.3, server)

this check/guard will always yield the same result

Check warning on line 387 in test/mongo_ecto/normalized_query_new_test.exs

GitHub Actions / test (6.0, 22.3.4.26, 1.12.3, server)

this check/guard will always yield the same result

Check warning on line 387 in test/mongo_ecto/normalized_query_new_test.exs

GitHub Actions / test (5.0, 24.3.4.10, 1.14.3, server)

this check/guard will always yield the same result

Check warning on line 387 in test/mongo_ecto/normalized_query_new_test.exs

GitHub Actions / test (6.0, 24.3.4.10, 1.14.3, server)

this check/guard will always yield the same result

Check warning on line 387 in test/mongo_ecto/normalized_query_new_test.exs

GitHub Actions / test (7.0, 22.3.4.26, 1.12.3, server)

this check/guard will always yield the same result

Check warning on line 387 in test/mongo_ecto/normalized_query_new_test.exs

GitHub Actions / test (7.0, 24.3.4.10, 1.14.3, server)

this check/guard will always yield the same result

Check warning on line 387 in test/mongo_ecto/normalized_query_new_test.exs

GitHub Actions / test (7.0, 23.3.4.18, 1.13.4, server)

this check/guard will always yield the same result

Check warning on line 387 in test/mongo_ecto/normalized_query_new_test.exs

GitHub Actions / test (6.0, 23.3.4.18, 1.13.4, server)

this check/guard will always yield the same result

Check warning on line 387 in test/mongo_ecto/normalized_query_new_test.exs

GitHub Actions / test (5.0, 22.3.4.26, 1.12.3, replica_set)

this check/guard will always yield the same result

Check warning on line 387 in test/mongo_ecto/normalized_query_new_test.exs

GitHub Actions / test (7.0, 24.3.4.10, 1.14.3, replica_set)

this check/guard will always yield the same result

Check warning on line 387 in test/mongo_ecto/normalized_query_new_test.exs

GitHub Actions / test (5.0, 24.3.4.10, 1.14.3, replica_set)

this check/guard will always yield the same result

Check warning on line 387 in test/mongo_ecto/normalized_query_new_test.exs

GitHub Actions / test (7.0, 23.3.4.18, 1.13.4, replica_set)

this check/guard will always yield the same result

Check warning on line 387 in test/mongo_ecto/normalized_query_new_test.exs

GitHub Actions / test (6.0, 22.3.4.26, 1.12.3, replica_set)

this check/guard will always yield the same result

Check warning on line 387 in test/mongo_ecto/normalized_query_new_test.exs

GitHub Actions / test (5.0, 23.3.4.18, 1.13.4, server)

this check/guard will always yield the same result

Check warning on line 387 in test/mongo_ecto/normalized_query_new_test.exs

GitHub Actions / test (6.0, 24.3.4.10, 1.14.3, replica_set)

this check/guard will always yield the same result

Check warning on line 387 in test/mongo_ecto/normalized_query_new_test.exs

GitHub Actions / test (6.0, 23.3.4.18, 1.13.4, replica_set)

this check/guard will always yield the same result

Check warning on line 387 in test/mongo_ecto/normalized_query_new_test.exs

GitHub Actions / test (7.0, 22.3.4.26, 1.12.3, replica_set)

this check/guard will always yield the same result

Check warning on line 387 in test/mongo_ecto/normalized_query_new_test.exs

GitHub Actions / test (5.0, 23.3.4.18, 1.13.4, replica_set)

this check/guard will always yield the same result

Check warning on line 387 in test/mongo_ecto/normalized_query_new_test.exs

GitHub Actions / test (6.0, 24.3.4.10, 1.14.3, server)

this check/guard will always yield the same result

Check warning on line 387 in test/mongo_ecto/normalized_query_new_test.exs

GitHub Actions / test (7.0, 24.3.4.10, 1.14.3, server)

this check/guard will always yield the same result

Check warning on line 387 in test/mongo_ecto/normalized_query_new_test.exs

GitHub Actions / test (5.0, 24.3.4.10, 1.14.3, server)

this check/guard will always yield the same result

Check warning on line 387 in test/mongo_ecto/normalized_query_new_test.exs

GitHub Actions / test (5.0, 22.3.4.26, 1.12.3, server)

this check/guard will always yield the same result

Check warning on line 387 in test/mongo_ecto/normalized_query_new_test.exs

GitHub Actions / test (6.0, 22.3.4.26, 1.12.3, server)

this check/guard will always yield the same result

Check warning on line 387 in test/mongo_ecto/normalized_query_new_test.exs

GitHub Actions / test (7.0, 22.3.4.26, 1.12.3, server)

this check/guard will always yield the same result

Check warning on line 387 in test/mongo_ecto/normalized_query_new_test.exs

GitHub Actions / test (5.0, 23.3.4.18, 1.13.4, server)

this check/guard will always yield the same result

Check warning on line 387 in test/mongo_ecto/normalized_query_new_test.exs

GitHub Actions / test (7.0, 23.3.4.18, 1.13.4, server)

this check/guard will always yield the same result

Check warning on line 387 in test/mongo_ecto/normalized_query_new_test.exs

GitHub Actions / test (6.0, 23.3.4.18, 1.13.4, server)

this check/guard will always yield the same result

Check warning on line 387 in test/mongo_ecto/normalized_query_new_test.exs

GitHub Actions / test (6.0, 24.3.4.10, 1.14.3, replica_set)

this check/guard will always yield the same result

Check warning on line 387 in test/mongo_ecto/normalized_query_new_test.exs

GitHub Actions / test (7.0, 24.3.4.10, 1.14.3, replica_set)

this check/guard will always yield the same result

Check warning on line 387 in test/mongo_ecto/normalized_query_new_test.exs

GitHub Actions / test (5.0, 22.3.4.26, 1.12.3, replica_set)

this check/guard will always yield the same result

Check warning on line 387 in test/mongo_ecto/normalized_query_new_test.exs

GitHub Actions / test (7.0, 23.3.4.18, 1.13.4, replica_set)

this check/guard will always yield the same result

Check warning on line 387 in test/mongo_ecto/normalized_query_new_test.exs

GitHub Actions / test (6.0, 23.3.4.18, 1.13.4, replica_set)

this check/guard will always yield the same result

Check warning on line 387 in test/mongo_ecto/normalized_query_new_test.exs

GitHub Actions / test (6.0, 22.3.4.26, 1.12.3, replica_set)

this check/guard will always yield the same result

Check warning on line 387 in test/mongo_ecto/normalized_query_new_test.exs

GitHub Actions / test (7.0, 22.3.4.26, 1.12.3, replica_set)

this check/guard will always yield the same result

Check warning on line 387 in test/mongo_ecto/normalized_query_new_test.exs

GitHub Actions / test (5.0, 23.3.4.18, 1.13.4, replica_set)

this check/guard will always yield the same result

Check warning on line 387 in test/mongo_ecto/normalized_query_new_test.exs

GitHub Actions / test (5.0, 24.3.4.10, 1.14.3, replica_set)

this check/guard will always yield the same result
assert_fields query, query: %{foo: %BSON.Binary{binary: <<0, ?a, ?b, ?c>>}}
query = "schema" |> where(foo: 123) |> select([], true) |> normalize
defmodule Ecto.Integration.RepoTest do
use Ecto.Integration.Case, async: Application.get_env(:ecto, :async_integration_tests, true)

Check warning on line 2 in test/ecto_test/repo_test.exs

GitHub Actions / test (5.0, 24.3.4.10, 1.14.3, server)

Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead

Check warning on line 2 in test/ecto_test/repo_test.exs

GitHub Actions / test (6.0, 24.3.4.10, 1.14.3, server)

Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead

Check warning on line 2 in test/ecto_test/repo_test.exs

GitHub Actions / test (7.0, 24.3.4.10, 1.14.3, server)

Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead

Check warning on line 2 in test/ecto_test/repo_test.exs

GitHub Actions / test (7.0, 24.3.4.10, 1.14.3, replica_set)

Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead

Check warning on line 2 in test/ecto_test/repo_test.exs

GitHub Actions / test (5.0, 24.3.4.10, 1.14.3, replica_set)

Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead

Check warning on line 2 in test/ecto_test/repo_test.exs

GitHub Actions / test (6.0, 24.3.4.10, 1.14.3, replica_set)

Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead

Check warning on line 2 in test/ecto_test/repo_test.exs

GitHub Actions / test (6.0, 24.3.4.10, 1.14.3, server)

Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead

Check warning on line 2 in test/ecto_test/repo_test.exs

GitHub Actions / test (7.0, 24.3.4.10, 1.14.3, server)

Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead

Check warning on line 2 in test/ecto_test/repo_test.exs

GitHub Actions / test (5.0, 24.3.4.10, 1.14.3, server)

Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead

Check warning on line 2 in test/ecto_test/repo_test.exs

GitHub Actions / test (6.0, 24.3.4.10, 1.14.3, replica_set)

Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead

Check warning on line 2 in test/ecto_test/repo_test.exs

GitHub Actions / test (7.0, 24.3.4.10, 1.14.3, replica_set)

Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead

Check warning on line 2 in test/ecto_test/repo_test.exs

GitHub Actions / test (5.0, 24.3.4.10, 1.14.3, replica_set)

Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead
import Ecto.Query
defmodule Ecto.Integration.AssocTest do
use Ecto.Integration.Case, async: Application.get_env(:ecto, :async_integration_tests, true)

Check warning on line 2 in test/ecto_test/assoc_test.exs

GitHub Actions / test (5.0, 24.3.4.10, 1.14.3, server)

Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead

Check warning on line 2 in test/ecto_test/assoc_test.exs

GitHub Actions / test (6.0, 24.3.4.10, 1.14.3, server)

Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead

Check warning on line 2 in test/ecto_test/assoc_test.exs

GitHub Actions / test (7.0, 24.3.4.10, 1.14.3, server)

Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead

Check warning on line 2 in test/ecto_test/assoc_test.exs

GitHub Actions / test (7.0, 24.3.4.10, 1.14.3, replica_set)

Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead

Check warning on line 2 in test/ecto_test/assoc_test.exs

GitHub Actions / test (5.0, 24.3.4.10, 1.14.3, replica_set)

Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead

Check warning on line 2 in test/ecto_test/assoc_test.exs

GitHub Actions / test (6.0, 24.3.4.10, 1.14.3, replica_set)

Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead

Check warning on line 2 in test/ecto_test/assoc_test.exs

GitHub Actions / test (6.0, 24.3.4.10, 1.14.3, server)

Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead

Check warning on line 2 in test/ecto_test/assoc_test.exs

GitHub Actions / test (7.0, 24.3.4.10, 1.14.3, server)

Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead

Check warning on line 2 in test/ecto_test/assoc_test.exs

GitHub Actions / test (5.0, 24.3.4.10, 1.14.3, server)

Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead

Check warning on line 2 in test/ecto_test/assoc_test.exs

GitHub Actions / test (6.0, 24.3.4.10, 1.14.3, replica_set)

Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead

Check warning on line 2 in test/ecto_test/assoc_test.exs

GitHub Actions / test (7.0, 24.3.4.10, 1.14.3, replica_set)

Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead

Check warning on line 2 in test/ecto_test/assoc_test.exs

GitHub Actions / test (5.0, 24.3.4.10, 1.14.3, replica_set)

Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead
import Ecto.Query