If you're interested in learning about connecting to MySQL using TypeORM and defining Entities, the NestJS documentation has all the information you need.
In a situation where you have to connect to a MySQL server with multiple databases and need to execute SQL queries directly (without relying on the Entity layer) to fetch results, it can be challenging. Particularly if you also require running cross-database queries.
So, how can this be achieved using NestJS? Let's find out!