'What is better to use in TypeORM, getRawOne function or partial select using getOne

I use NestJs and TypeORM and sometimes I need to receive partial entity or even only one column, and my question is what is better to use to achieve this, getRawOne or getOne with parial select ?

Links to TypeORM documentation:

https://github.com/typeorm/typeorm/blob/master/docs/select-query-builder.md#partial-selection https://github.com/typeorm/typeorm/blob/master/docs/select-query-builder.md#getting-raw-results



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source