Nest.js TypeORM Streaming Query to CSV File — Perf not so good
TypeORM have the stream method on the createQueryBuilder then we can chain this to some processing like newLineToSpace , make the CSV and send back to the response. The code may look like below import { ReadStream } from 'typeorm/platform/PlatformTools';
import { pipeline } from 'stream/promises';


// ... Nest.js Controller ...

const manager…
Nest.js TypeORM Streaming Query to CSV File — Perf not so good TypeORM have the stream method on the createQueryBuilder then we can chain this to some processing like newLineToSpace , make the CSV and send back to the response. The code may look like below import { ReadStream } from 'typeorm/platform/PlatformTools';
import { pipeline } from 'stream/promises';


// ... Nest.js Controller ...

const manager… web-development
Nestjs TypeORM Streaming Query CSV File — Perf good TypeORM stream method createQueryBuilder chain processing like newLineToSpace make CSV send back response code may look like import ReadStream typeormplatformPlatformTools import pipeline streampromises Nestjs Controller const manager… webdevelopment