Ecto.Adapters.QuackDB (quackdb v0.7.0)

Copy Markdown View Source

Minimal Ecto SQL adapter for QuackDB.

Ecto SQL adapter for DuckDB over QuackDB. Supports raw SQL, analytical query generation, insert paths, common mutations, and basic migration DDL.

Configuration

config :my_app, MyApp.AnalyticsRepo,
  adapter: Ecto.Adapters.QuackDB,
  uri: "http://[::1]:9494",
  token: "super_secret"

Non-finite floats

FLOAT and DOUBLE values that are infinite or NaN decode to :infinity, :neg_infinity, and :nan, as Explorer spells them. Ecto's :float type rejects atoms, so a schema field holding one raises on load, the same contract Postgrex has with :inf and :NaN; Repo.query/2 returns the atoms as they are. See the "Non-finite floats" section of the type support guide for a custom type that carries them through a schema.

Migrations

DuckDB adds a null: false column in two statements, and the second cannot run in the transaction that ran the first. A migration that adds a NOT NULL column sets @disable_ddl_transaction true; inside the DDL transaction the adapter refuses it with an :ecto_feature_not_supported error instead of letting DuckDB fail.