@nest-extended/typeorm

The TypeORM adapter: the same generic CRUD service and FeathersJS query language as the Prisma adapter, translating operators to TypeORM FindOperators.

$npm install @nest-extended/core @nest-extended/typeorm @nest-extended/decorators nestjs-cls

Key exports

ExportTypePurpose
NestService<T>classCRUD service wrapping a TypeORM Repository
applyFilters()functionApply parsed filters to TypeORM find-options
rawQuery()functionConvert a FeathersJS query to a TypeORM where (Equal, MoreThan, ILike, …)
GlobalExceptionFilterfilterMaps QueryFailedError and driver codes (Postgres / MySQL / SQLite) to HTTP

Usage

cats.service.ts
import { Injectable } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { Repository } from 'typeorm';
import { NestService } from '@nest-extended/typeorm';
import { Cat } from './entities/cat.entity';
 
@Injectable()
export class CatsService extends NestService<Cat> {
  constructor(@InjectRepository(Cat) repo: Repository<Cat>) {
    super(repo);
  }
}
Querying
await catsService._find({
  name: { $iLike: 'kitty' },
  age: { $gt: 5 },
  $include: { owner: true },
  $sort: { createdAt: -1 },
  $limit: 10,
});

The query API is identical to @nest-extended/prisma — relations use $include, mapped to TypeORM relations.

Next steps