typeorm

Provide TypeORM development guidelines for TypeScript entities, repositories, migrations, and data sources.

10.4k|222|Updated May 22, 2018
One-click install
npx skills add https://github.com/rolling-scopes/rsschool-app --skill typeorm-rolling-scopes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typeorm
Source: https://github.com/rolling-scopes/rsschool-app/tree/main/.agents/skills/typeorm
Command: npx skills add https://github.com/rolling-scopes/rsschool-app --skill typeorm-rolling-scopes

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Guidelines and best practices for designing, implementing, and maintaining data models using TypeORM in TypeScript-based projects.

Core Features & Use Cases

  • Entity modeling: Define clean, scalable entities with decorators and relations.
  • Repositories and data access: Apply repository patterns and query builders for robust data access.
  • Migrations and data sources: Manage migrations, connections, and configuration for multiple databases.

Quick Start

Create a starter TypeORM project and implement a User entity using the TypeORM decorators.

Frequently Asked Questions about typeorm

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What's the best way to structure TypeORM entities and relations in a TypeScript project?

TypeORM entities in TypeScript should use decorators to define table columns and relations, ensuring clean, scalable data models. Following established development guidelines helps maintain robust entity modeling across Node.js and NestJS projects.

How do I configure TypeORM data sources and manage database migrations?

Configuring TypeORM data sources involves setting up connection parameters for multiple databases, while managing migrations requires generating and executing schema changes. Established guidelines ensure reliable database schema evolution and connection handling.

When should I use the active-record vs data-mapper pattern in TypeORM?

Choosing between active-record and data-mapper patterns in TypeORM depends on your application's complexity and data access needs. The data-mapper approach with repositories suits complex query building, while active-record works for simpler domain models.

Does TypeORM work with NestJS for building scalable data access layers?

TypeORM works seamlessly with NestJS to build scalable data access layers using TypeScript. It provides comprehensive guidelines for implementing repository patterns and query builders tailored for robust Node.js applications.

How do I apply the repository pattern and query builders for data access in TypeORM?

Applying the repository pattern in TypeORM involves creating dedicated classes for data access, utilizing query builders for complex queries. This approach ensures robust data retrieval and manipulation while keeping business logic separate from persistence concerns.