Something went wrong. Try again.
An Ecto SQLite3 adapter.
Something went wrong. Try again.
468 B · 21 lines
Elixir
12345678910111213141516171819202122defmodule Ecto.Integration.HintsTest do use Ecto.Integration.Case, async: true
import Ecto.Query, only: [from: 2]
alias Ecto.Integration.Post alias Ecto.Integration.TestRepo
test "from hints" do {:ok, _} = TestRepo.query("CREATE INDEX post_id_idx ON posts (id)") TestRepo.insert!(%Post{id: 1})
results = from(Post, hints: ["INDEXED BY post_id_idx"] ) |> TestRepo.all()
assert [%Post{id: 1}] = results endend