What problem does it solve?
Prevents unsafe or non-idiomatic database access in NestJS applications using TypeORM 0.3.x DataSource by eliminating raw SQL, insecure string-based queries, incorrect relation loading, and improper migration or transaction usage. It reduces runtime bugs, security vulnerabilities (SQL injection), and schema drift caused by ad-hoc DDL changes.
Core Features & Use Cases
- Code reviews and audits: Detect repository.query/dataSource.query, string WHERE clauses, manual DDL, and unsafe transaction patterns and provide exact fixes.
- Guided fixes and scaffolding: Produce entities, repository/service methods, and QueryBuilder implementations that follow TypeORM 0.3.x patterns and relation-loading rules.
- Migration & transaction guidance: Instruct on CLI-based migration generation/run workflows and safe data-source transaction usage for multi-step updates.
- Use Case: Convert a legacy service that uses raw SQL into a repository + QueryBuilder implementation with parameterized queries and a generated migration.
Quick Start
Use the typeorm skill to review the repository for raw SQL and anti-patterns then produce corrected TypeORM 0.3.x code and migration instructions citing the official docs.