File size: 355 Bytes
3e21b19
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
defmodule Plausible.AsyncInsertRepo do
  @moduledoc """
  Clickhouse access with async inserts enabled
  """

  use Ecto.Repo,
    otp_app: :plausible,
    adapter: Ecto.Adapters.ClickHouse

  defmacro __using__(_) do
    quote do
      alias Plausible.AsyncInsertRepo
      import Ecto
      import Ecto.Query, only: [from: 1, from: 2]
    end
  end
end