Blockchain explorer for Ethereum based network and a tool for inspecting and analyzing EVM based blockchains.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
blockscout/lib/explorer/repo.ex

21 lines
520 B

defmodule Explorer.Repo do
use Ecto.Repo, otp_app: :explorer
use Scrivener, page_size: 10
@dialyzer {:nowarn_function, rollback: 1}
@doc """
Dynamically loads the repository url from the
DATABASE_URL environment variable.
"""
def init(_, opts) do
{:ok, Keyword.put(opts, :url, System.get_env("DATABASE_URL"))}
end
defmodule NewRelic do
use NewRelixir.Plug.Repo, repo: Explorer.Repo
def paginate(queryable, opts \\ []) do
Explorer.Repo.paginate(queryable, opts)
end
end
end