SeaOrmModule::for_root_async connects and exports DatabaseConnection for injection.
Drizzle stays carved out of workspace members (upstream/MSRV). For Prisma-style access use nestrs-prisma; for raw SQL use SqlxDatabaseModule.
Install
sqlx-sqlite feature (sqlite::memory: and file URLs work out of the box). For Postgres or MySQL, add a direct sea-orm dependency with the matching driver feature (same 1.1 line) in your app.
Connect and inject
for_root_async must finish before NestFactory::create (same rule as MongoModule::for_root_async). Merge the DynamicModule with create_with_modules so Arc<DatabaseConnection> is exported:
DbConn is a type alias for DatabaseConnection. Inject Arc<DatabaseConnection> (the registry stores Arc).
Compared with other SQL paths
Define SeaORM
Entity types in your crate and use the injected connection as you would in a standalone SeaORM app.