# Feature catalog — diesel-rs/diesel

> Canonical page: https://codevetter.com/unpack/diesel/feature-catalog

# Feature catalog — diesel-rs/diesel

Scanned commit 5cdf54e1434b87084a4630c100249f1028f3e32d (2026-10-02). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

Diesel's primary interface is a Rust API for composing and executing queries against typed schemas. The CLI adds database setup, migration lifecycle commands, schema generation, and shell completions. Supporting libraries offer runtime schema names, custom type conversion, and several migration sources. Examples demonstrate associations, authenticated blog operations, and embedded SQLite.
- Query composition includes filtering, selection, ordering, limits, and association-based subqueries; construction remains separate from load execution. — [README.md#L69-L83](https://github.com/diesel-rs/diesel/blob/5cdf54e1434b87084a4630c100249f1028f3e32d/README.md#L69-L83) [diesel/src/query_dsl/mod.rs#L694-L699](https://github.com/diesel-rs/diesel/blob/5cdf54e1434b87084a4630c100249f1028f3e32d/diesel/src/query_dsl/mod.rs#L694-L699) [diesel/src/query_dsl/mod.rs#L1702-L1706](https://github.com/diesel-rs/diesel/blob/5cdf54e1434b87084a4630c100249f1028f3e32d/diesel/src/query_dsl/mod.rs#L1702-L1706)
- The DSL exports insert_into, update, delete, insert_or_ignore_into, replace_into, select, and sql_query; execute returns affected-row counts, while get_result returns the first row or Error::NotFound. — [diesel/src/lib.rs#L385-L392](https://github.com/diesel-rs/diesel/blob/5cdf54e1434b87084a4630c100249f1028f3e32d/diesel/src/lib.rs#L385-L392) [diesel/src/query_dsl/load_dsl.rs#L91-L99](https://github.com/diesel-rs/diesel/blob/5cdf54e1434b87084a4630c100249f1028f3e32d/diesel/src/query_dsl/load_dsl.rs#L91-L99) [diesel/src/query_dsl/mod.rs#L1886-L1893](https://github.com/diesel-rs/diesel/blob/5cdf54e1434b87084a4630c100249f1028f3e32d/diesel/src/query_dsl/mod.rs#L1886-L1893)
- Associations support belonging_to and grouped_by, while joins support related and nullable records; the PostgreSQL relations example demonstrates one-to-many and many-to-many traversal. — [examples/postgres/relations/src/main.rs#L67-L111](https://github.com/diesel-rs/diesel/blob/5cdf54e1434b87084a4630c100249f1028f3e32d/examples/postgres/relations/src/main.rs#L67-L111) [examples/postgres/relations/src/main.rs#L118-L140](https://github.com/diesel-rs/diesel/blob/5cdf54e1434b87084a4630c100249f1028f3e32d/examples/postgres/relations/src/main.rs#L118-L140)
- CLI commands are migration, setup, database/db, completions, and print-schema; migration dispatch implements run, revert, redo, list, pending, and generate. — [diesel_cli/src/cli.rs#L55-L79](https://github.com/diesel-rs/diesel/blob/5cdf54e1434b87084a4630c100249f1028f3e32d/diesel_cli/src/cli.rs#L55-L79) [diesel_cli/src/migrations/mod.rs#L207-L239](https://github.com/diesel-rs/diesel/blob/5cdf54e1434b87084a4630c100249f1028f3e32d/diesel_cli/src/migrations/mod.rs#L207-L239) [diesel_cli/src/migrations/mod.rs#L241-L272](https://github.com/diesel-rs/diesel/blob/5cdf54e1434b87084a4630c100249f1028f3e32d/diesel_cli/src/migrations/mod.rs#L241-L272)
- Schema configuration supports documentation, table filters, column order, schema namespaces, patches, imported/custom types, Rust enums, views, and experimental view-nullability inference. — [diesel_cli/src/config.rs#L488-L523](https://github.com/diesel-rs/diesel/blob/5cdf54e1434b87084a4630c100249f1028f3e32d/diesel_cli/src/config.rs#L488-L523)
- Migration generation can compare a Rust schema with the live database to produce up/down SQL; migration libraries additionally support filesystem SQL, embedded SQL, and Rust callbacks or TypedMigration implementations. — [diesel_cli/src/migrations/mod.rs#L281-L330](https://github.com/diesel-rs/diesel/blob/5cdf54e1434b87084a4630c100249f1028f3e32d/diesel_cli/src/migrations/mod.rs#L281-L330) [diesel_migrations/src/file_based_migrations.rs#L15-L32](https://github.com/diesel-rs/diesel/blob/5cdf54e1434b87084a4630c100249f1028f3e32d/diesel_migrations/src/file_based_migrations.rs#L15-L32) [diesel_migrations/migrations_macros/src/lib.rs#L31-L40](https://github.com/diesel-rs/diesel/blob/5cdf54e1434b87084a4630c100249f1028f3e32d/diesel_migrations/migrations_macros/src/lib.rs#L31-L40) [diesel_migrations/src/rust_migrations.rs#L10-L29](https://github.com/diesel-rs/diesel/blob/5cdf54e1434b87084a4630c100249f1028f3e32d/diesel_migrations/src/rust_migrations.rs#L10-L29)
- diesel_dynamic_schema constructs tables and columns at runtime with explicit selections; custom Rust values can implement ToSql and FromSql, as illustrated by the Language enum. — [diesel_dynamic_schema/src/lib.rs#L13-L27](https://github.com/diesel-rs/diesel/blob/5cdf54e1434b87084a4630c100249f1028f3e32d/diesel_dynamic_schema/src/lib.rs#L13-L27) [diesel_dynamic_schema/src/lib.rs#L48-L57](https://github.com/diesel-rs/diesel/blob/5cdf54e1434b87084a4630c100249f1028f3e32d/diesel_dynamic_schema/src/lib.rs#L48-L57) [examples/postgres/custom_types/src/model.rs#L7-L35](https://github.com/diesel-rs/diesel/blob/5cdf54e1434b87084a4630c100249f1028f3e32d/examples/postgres/custom_types/src/model.rs#L7-L35)
- The advanced blog example offers paginated posts/comments, registration, post creation/editing/publishing, and comment creation/editing; the embedded SQLite example repeatedly queries both static and dynamic schemas. — [examples/postgres/advanced-blog-cli/src/main.rs#L34-L79](https://github.com/diesel-rs/diesel/blob/5cdf54e1434b87084a4630c100249f1028f3e32d/examples/postgres/advanced-blog-cli/src/main.rs#L34-L79) [examples/postgres/advanced-blog-cli/src/main.rs#L81-L153](https://github.com/diesel-rs/diesel/blob/5cdf54e1434b87084a4630c100249f1028f3e32d/examples/postgres/advanced-blog-cli/src/main.rs#L81-L153) [examples/sqlite/embedded/src/main.rs#L63-L94](https://github.com/diesel-rs/diesel/blob/5cdf54e1434b87084a4630c100249f1028f3e32d/examples/sqlite/embedded/src/main.rs#L63-L94)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
