Skip to content

Commit

Permalink
add Elixir v1.18
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslandoga committed Dec 21, 2024
1 parent 807bcb6 commit 710f49d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 18 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/mix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ jobs:
otp: 27
clickhouse: latest
timezone: UTC
- elixir: 1.17
- elixir: 1.18
otp: 27
clickhouse: latest
timezone: UTC
- elixir: 1.18
otp: 27
clickhouse: latest
timezone: Europe/Berlin
Expand Down
20 changes: 3 additions & 17 deletions lib/ecto/adapters/clickhouse.ex
Original file line number Diff line number Diff line change
Expand Up @@ -283,23 +283,9 @@ defmodule Ecto.Adapters.ClickHouse do

@dialyzer {:no_return, update: 6}
@impl Ecto.Adapter.Schema
def update(adapter_meta, %{source: source, prefix: prefix}, fields, params, returning, opts) do
{fields, field_values} = :lists.unzip(fields)
filter_values = Keyword.values(params)
sql = @conn.update(prefix, source, fields, params, returning)

Ecto.Adapters.SQL.struct(
adapter_meta,
@conn,
sql,
:update,
source,
params,
field_values ++ filter_values,
:raise,
returning,
opts
)
def update(_adapter_meta, _schema_meta, _fields, _params, _returning, _opts) do
raise ArgumentError,
"ClickHouse does not support UPDATE statements -- use ALTER TABLE ... UPDATE instead"
end

# TODO
Expand Down

0 comments on commit 710f49d

Please sign in to comment.