nestrs-drizzle is the Rust analogue of NestJS’s
@nestjs/typeorm when Drizzle
is the chosen query builder. The crate re-exports drizzle_orm::* at the
crate root and adds the boot-time module / service shape NestJS apps expect.
Install
all for
multi-driver tools):
postgres— sqlx postgresmysql— sqlx mysqlsqlite— sqlx sqliteall— all three (larger compile, but useful for CLI tools)
Boot
postgres:// and
postgresql:// flip on is_postgres(), mysql:// and mariadb://
flip on is_mysql(), sqlite:// and sqlite: flip on is_sqlite().
Define a schema
nestrs_drizzle::schema::table re-exports drizzle_orm::table!:
nestrs_drizzle::schema::{Int4, Int8, Int2, Text, Bool, Timestamp, Varchar}.
Use the typed query builder
Configuration
DrizzleOptions builder wraps the URL with the driver-tuning knobs the
average app actually reaches for:
parsed() returns a url::Url for the configured connection,
surfacing InvalidUrl if the URL is malformed.
API surface
Feature flags
default = []— base crate, no SQL backend enabled.postgres—drizzle-orm/postgres.mysql—drizzle-orm/mysql.sqlite—drizzle-orm/sqlite.all— convenience for all three backends.