Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit 9470e15

Browse files
author
Joao Felipe Santoro Pinto
authored
docs: fix code example (typeorm#7615)
Fix code example for executing a Raw Query on a Slave Query Runner.
1 parent f85f436 commit 9470e15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/multiple-connections.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ If you want to use `slave` in raw queries, you also need to explicitly specify t
298298

299299
const slaveQueryRunner = connection.createQueryRunner("slave");
300300
try {
301-
const userFromSlave = await connection.query('SELECT * FROM users WHERE id = $1', [userId], slaveQueryRunner);
301+
const userFromSlave = await slaveQueryRunner.query('SELECT * FROM users WHERE id = $1', [userId], slaveQueryRunner);
302302
} finally {
303303
return slaveQueryRunner.release();
304304
}

0 commit comments

Comments
 (0)