Entity Manager API
EntityManager API
const connection = manager.connection;const queryRunner = manager.queryRunner;await manager.transaction(async manager => {
// NOTE: you must perform all database operations using the given manager instance
// it's a special instance of EntityManager working with this transaction
// and don't forget to await things here
});const rawData = await manager.query(`SELECT * FROM USERS`);const users = await manager.createQueryBuilder()
.select()
.from(User, "user")
.where("user.name = :name", { name: "John" })
.getMany();Last updated