Skip to content

Commit 630f3d6

Browse files
author
daniel
committed
docs: correct example of conditional chained transaction
1 parent 8c73e0c commit 630f3d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ let results = await mysql.transaction()
250250
.query('DELETE FROM table WHERE id = ?', [someVar])
251251
.query((r) => {
252252
if (r.affectedRows > 0) {
253-
['UPDATE anotherTable SET x = 1 WHERE id = ?', [someVar]]
253+
return ['UPDATE anotherTable SET x = 1 WHERE id = ?', [someVar]]
254254
} else {
255255
return null
256256
}

0 commit comments

Comments
 (0)