nest-profiler-typeorm
API reference for @eleven-labs/nest-profiler-typeorm — TypeORM query collector.
TypeOrmCollectorModuleOptions
Options passed to TypeOrmCollectorModule.forRoot().
Prop
Type
QueryEntry
One entry per SQL query executed during a request.
Prop
Type
QueryType
type QueryType = 'SELECT' | 'INSERT' | 'UPDATE' | 'DELETE' | 'OTHER';Detected from the first keyword of the SQL string.
Public exports
import { TypeOrmCollectorModule } from '@eleven-labs/nest-profiler-typeorm';
import { TypeOrmCollector } from '@eleven-labs/nest-profiler-typeorm';
import type {
TypeOrmCollectorModuleOptions,
QueryEntry,
QueryType,
} from '@eleven-labs/nest-profiler-typeorm';Setup
// In ProductsModule (or any module that uses TypeORM):
TypeOrmCollectorModule.forRoot({
slowQueryThreshold: 50, // ms — queries above this are highlighted red
});Prerequisite: TypeOrmModule.forRoot() must be registered in the application (provides DataSource globally via @InjectDataSource()).