Add DuckDB dialect and e2e integration tests#13
Merged
dannywillems merged 4 commits intomainfrom Feb 10, 2026
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
(DuckDB lacks AUTOINCREMENT/SERIAL, so
CREATE SEQUENCE+DEFAULT nextval()is emitted automatically)Select,Update, andDeletebuilders to propagateWHERE clause parameters in
build()outputdatabase using the fully typed builders
Test plan
make test— all 201 tests pass (154 unit + 25 derive + 5duckdb e2e + 5 sqlite + 12 doctests)
make lint— zero clippy warningsmake check-format— formatting clean