Skip to content

Add DuckDB dialect and e2e integration tests#13

Merged
dannywillems merged 4 commits intomainfrom
danny/duckdb-dialect
Feb 10, 2026
Merged

Add DuckDB dialect and e2e integration tests#13
dannywillems merged 4 commits intomainfrom
danny/duckdb-dialect

Conversation

@dannywillems
Copy link
Contributor

Summary

  • Add DuckDB migration dialect with sequence-backed autoincrement
    (DuckDB lacks AUTOINCREMENT/SERIAL, so CREATE SEQUENCE +
    DEFAULT nextval() is emitted automatically)
  • Fix typed Select, Update, and Delete builders to propagate
    WHERE clause parameters in build() output
  • Add 5 e2e integration tests running against an in-memory DuckDB
    database using the fully typed builders

Test plan

  • make test — all 201 tests pass (154 unit + 25 derive + 5
    duckdb e2e + 5 sqlite + 12 doctests)
  • make lint — zero clippy warnings
  • make check-format — formatting clean

DuckDB does not support AUTOINCREMENT or SERIAL/BIGSERIAL. Instead,
auto-increment is implemented via CREATE SEQUENCE + DEFAULT nextval().
The create_table override emits the sequence DDL automatically for
every column marked with autoincrement.
The typed builders were not including WHERE clause parameters in their
build() output. Select returned empty params, Update only returned SET
params, and Delete always returned vec![]. All three now correctly
extend params with where_expr.params().
Five tests exercising the full stack: DuckDB dialect DDL generation,
typed Insert/Select/Update/Delete builders, and actual DuckDB query
execution. Tests cover autoincrement sequences, WHERE param
propagation, the consumer scenario (excluded_domains/excluded_ips),
and CRUD operations.
Replace the manual Table trait implementation in the top-level docs
with a proper tutorial using #[derive(Table)]. Add under-the-hood
section showing the macro expansion, typed query examples for
SELECT/INSERT/UPDATE/DELETE, and comprehensive migrations docs
covering column helpers, operations, dependencies, MigrationRunner
workflow, and dialect comparison table. All 21 doc-tests compile.
@dannywillems dannywillems merged commit 68720a1 into main Feb 10, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant