typeorm-v0.3

Locate TypeORM v0.3 APIs across PostgreSQL projects with NestJS integration.

1|Updated Mar 6, 2026
One-click install
npx skills add https://github.com/zenbuapps/zenbu-powers --skill typeorm-v0-3
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typeorm-v0.3
Source: https://github.com/zenbuapps/zenbu-powers/tree/main/skills/typeorm-v0.3
Command: npx skills add https://github.com/zenbuapps/zenbu-powers --skill typeorm-v0-3

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

TypeORM v0.3 完整技術參考,對應 typeorm ^0.3.x。 當程式碼出現任何以下情況時,必須使用此 skill: import from 'typeorm'、import from '@nestjs/typeorm'; new DataSource、DataSourceOptions、createQueryBuilder、 @Entity、@PrimaryColumn、@PrimaryGeneratedColumn、@ObjectIdColumn、@Column、@Generated、 @CreateDateColumn、@UpdateDateColumn、@DeleteDateColumn、@VersionColumn、 @OneToOne、@OneToMany、@ManyToOne、@ManyToMany、@JoinColumn、@JoinTable、@RelationId、 @Tree、@TreeParent、@TreeChildren、@TreeLevelColumn、@Index、@Unique、@Check、@Exclusion、 @BeforeInsert、@AfterInsert、@BeforeUpdate、@AfterUpdate、@BeforeRemove、@AfterRemove、 @BeforeSoftRemove、@AfterSoftRemove、@BeforeRecover、@AfterRecover、@AfterLoad、 @EventSubscriber、EntitySubscriberInterface、 Repository、EntityManager、QueryRunner、SelectQueryBuilder、FindOptionsWhere、FindManyOptions、FindOneOptions、 Not、LessThan、LessThanOrEqual、MoreThan、MoreThanOrEqual、Equal、Like、ILike、Between、In、Any、IsNull、 ArrayContains、ArrayContainedBy、ArrayOverlap、JsonContains、Raw、Brackets、NotBrackets、 MigrationInterface、TypeOrmModule.forRoot、TypeOrmModule.forRootAsync、TypeOrmModule.forFeature、 @InjectRepository、@InjectDataSource、@InjectEntityManager。 預設對 PostgreSQL(但 API 本身 DB-agnostic)。v0.3 對 v0.2 有多項 breaking changes:DataSource 取代 Connection、 Repository 不再是抽象類、QueryBuilder 使用命名參數改版、FindOptions API 強型別化。

Core Features & Use Cases

  • DataSource 與設定、Entity 定義、@Column 選項、關聯與 Repository 使用方法的全面指導。
  • NestJS 整合、多 DataSource 管理、Migrations、Listeners & Subscribers、QueryBuilder 的實踐場景,面向真實專案。
  • 關於 v0.3 的變更與遷移實務重點,提供在 PostgreSQL 環境中的最佳實踐與範例。

Quick Start

Start by understanding the basics of configuring a DataSource, defining Entities and Columns, and using Repositories according to v0.3 patterns.

Frequently Asked Questions about typeorm-v0.3

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

FAQPage Schema
How do I configure a DataSource in TypeORM v0.3 to replace the old Connection setup?

TypeORM v0.3 uses DataSource to replace the deprecated Connection. You configure it by instantiating a new DataSource object with DataSourceOptions and calling the initialize method to establish your PostgreSQL database connection.

What is the correct way to set up TypeORM migrations in a NestJS project?

TypeORM migrations in NestJS require configuring TypeOrmModule.forRootAsync with migration paths. You implement the MigrationInterface with up and down methods to apply schema changes safely across your PostgreSQL database.

Does TypeORM v0.3 support multiple DataSource instances for different databases in NestJS?

TypeORM v0.3 supports multiple DataSource instances in NestJS. You configure multiple TypeOrmModule.forRootAsync connections and inject specific instances using the @InjectDataSource and @InjectRepository decorators.

How do I use FindOptionsWhere and typed QueryBuilders in TypeORM v0.3?

TypeORM v0.3 strongly types FindOptions APIs like FindOptionsWhere. You pass strongly typed objects to repository methods for queries, or use createQueryBuilder with named parameters for complex filtering and joins.

Why does my TypeORM Repository throw errors after upgrading to v0.3?

TypeORM v0.3 changed Repository from an abstract class to a concrete class and updated QueryBuilder named parameters. Migrating requires updating your Repository imports and adjusting QueryBuilder parameter syntax to match v0.3 breaking changes.