Comments (1)
Like other queries in ClickhouseEcto.Query
the fix is to change the connection execute ddl to
def execute_ddl(command),
do: ClickhouseEcto.Migration.execute_ddl(command) |> IO.iodata_to_binary()
but it then fails with
** (UndefinedFunctionError) function ClickhouseEcto.Connection.ddl_logs/1 is undefined or private
(clickhouse_ecto 0.3.0) ClickhouseEcto.Connection.ddl_logs(%Clickhousex.Result{columns: ["count"], command: :updated, num_rows: 1, rows: [[1]]})
(elixir 1.12.2) lib/enum.ex:3894: Enum.flat_map_list/2
(ecto_sql 3.7.0) lib/ecto/adapters/sql.ex:845: Ecto.Adapters.SQL.execute_ddl/4
(ecto_sql 3.7.0) lib/ecto/migrator.ex:645: Ecto.Migrator.verbose_schema_migration/3
(ecto_sql 3.7.0) lib/ecto/migrator.ex:473: Ecto.Migrator.lock_for_migrations/4
(ecto_sql 3.7.0) lib/ecto/migrator.ex:388: Ecto.Migrator.run/4
(ecto_sql 3.7.0) lib/ecto/migrator.ex:146: Ecto.Migrator.with_repo/3
(ecto_sql 3.7.0) lib/mix/tasks/ecto.migrate.ex:133: anonymous fn/5 in Mix.Tasks.Ecto.Migrate.run/2
Update: this fixes the above error:
def ddl_logs(%Clickhousex.Result{command: command, num_rows: num_rows}),
do: [{:debug, "Successfully #{command} #{num_rows} rows", []}]
Now the problem is:
** (UndefinedFunctionError) function ClickhouseEcto.lock_for_migrations/3 is undefined or private
(clickhouse_ecto 0.3.0) ClickhouseEcto.lock_for_migrations(%{cache: #Reference<0.1177087518.2266628098.100040>, opts: [timeout: 15000, pool_size: 2, pool: DBConnection.ConnectionPool], pid: #PID<0.632.0>, repo: Things5.ChRepo, sql: ClickhouseEcto.Connection, telemetry: {Things5.ChRepo, :debug, [:things5, :ch_repo, :query]}}, [migration_source: "schema_migrations", all: true], #Function<13.122349345/0 in Ecto.Migrator.lock_for_migrations/4>)
which seems to happen even with:
use Ecto.Adapters.SQL,
driver: :clickhousex,
migration_lock: false
from clickhouse_ecto.
Related Issues (12)
- Limit query does not work correctly
- Can not use ecto multy HOT 2
- Hex.pm code/dependencies outdated HOT 1
- Ecto 3 HOT 1
- No migration rollbacks
- Doesn't work with the latest version of clickhousex
- Authorization doesn't work with later versions of Clickhouse HOT 1
- Possible typo HOT 2
- Ecto subqueries leads to missing select clause HOT 3
- WITH TOTALS dont work HOT 1
- Positional parameters HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clickhouse_ecto.