Something went wrong. Try again.
An Ecto SQLite3 adapter.
Something went wrong. Try again.
1.2 kB · 43 lines
Elixir
1234567891011121314151617181920212223242526272829303132333435363738394041424344pg_bench_url = System.get_env("PG_URL") || "postgres:postgres@localhost"myxql_bench_url = System.get_env("MYXQL_URL") || "root@localhost"
Application.put_env( :ecto_sql, Ecto.Bench.PgRepo, url: "ecto://" <> pg_bench_url <> "/ecto_test", adapter: Ecto.Adapters.Postgres, show_sensitive_data_on_connection_error: true)
Application.put_env( :ecto_sql, Ecto.Bench.MyXQLRepo, url: "ecto://" <> myxql_bench_url <> "/ecto_test_myxql", adapter: Ecto.Adapters.MyXQL, protocol: :tcp, show_sensitive_data_on_connection_error: true)
Application.put_env( :ecto_sql, Ecto.Bench.SQLite3Repo, adapter: Ecto.Adapters.SQLite3, database: "/tmp/SQLite3_bench.db", journal_mode: :wal, cache_size: -64000, temp_store: :memory, pool_size: 5, show_sensitive_data_on_connection_error: true)
defmodule Ecto.Bench.PgRepo do use Ecto.Repo, otp_app: :ecto_sql, adapter: Ecto.Adapters.Postgres, log: falseend
defmodule Ecto.Bench.MyXQLRepo do use Ecto.Repo, otp_app: :ecto_sql, adapter: Ecto.Adapters.MyXQL, log: falseend
defmodule Ecto.Bench.SQLite3Repo do use Ecto.Repo, otp_app: :ecto_sql, adapter: Ecto.Adapters.SQLite3, log: falseend