Skip to content

Commit

Permalink
stub stream support (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslandoga authored Apr 17, 2023
1 parent 73c0fc3 commit 70884e4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/ecto/adapters/clickhouse/connection.ex
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ defmodule Ecto.Adapters.ClickHouse.Connection do
DBConnection.execute(conn, query, params, opts)
end

# TODO what should be done about transactions? probably will need to build custom Repo.stream
@impl true
def query(conn, statement, params, opts) do
Ch.query(conn, statement, params, opts)
Expand All @@ -36,8 +37,8 @@ defmodule Ecto.Adapters.ClickHouse.Connection do
end

@impl true
def stream(_conn, _statement, _params, _opts) do
raise "ClickHouse does not support cursors"
def stream(conn, statement, params, opts) do
Ch.stream(conn, statement, params, opts)
end

@impl true
Expand Down

0 comments on commit 70884e4

Please sign in to comment.