From 710f49d02dc6df578738d4e5f149ae3abe816b88 Mon Sep 17 00:00:00 2001 From: ruslandoga <67764432+ruslandoga@users.noreply.github.com> Date: Sat, 21 Dec 2024 13:54:43 +0700 Subject: [PATCH] add Elixir v1.18 --- .github/workflows/mix.yml | 6 +++++- lib/ecto/adapters/clickhouse.ex | 20 +++----------------- 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/.github/workflows/mix.yml b/.github/workflows/mix.yml index f5467b3..9cd9e55 100644 --- a/.github/workflows/mix.yml +++ b/.github/workflows/mix.yml @@ -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 diff --git a/lib/ecto/adapters/clickhouse.ex b/lib/ecto/adapters/clickhouse.ex index 59bb112..43b8053 100644 --- a/lib/ecto/adapters/clickhouse.ex +++ b/lib/ecto/adapters/clickhouse.ex @@ -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