- flake.nix: Elixir 1.18.4 / OTP 27 / Node 22 dev shell - .envrc: use flake - config/config.exs: move fetch_env! to runtime.exs (compile-time safe) - config/runtime.exs: all secrets loaded at runtime via env vars - mix.lock: generated after mix deps.get - All 3 apps compile cleanly Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
15 lines
512 B
Elixir
15 lines
512 B
Elixir
defmodule Ecto.Integration.QueryManyTest do
|
|
use Ecto.Integration.Case, async: true
|
|
|
|
alias Ecto.Integration.TestRepo
|
|
|
|
test "query_many!/4" do
|
|
results = TestRepo.query_many!("SELECT 1; SELECT 2;")
|
|
assert [%{rows: [[1]], num_rows: 1}, %{rows: [[2]], num_rows: 1}] = results
|
|
end
|
|
|
|
test "query_many!/4 with iodata" do
|
|
results = TestRepo.query_many!(["SELECT", ?\s, ?1, ";", ?\s, "SELECT", ?\s, ?2, ";"])
|
|
assert [%{rows: [[1]], num_rows: 1}, %{rows: [[2]], num_rows: 1}] = results
|
|
end
|
|
end
|