Skip to content

Commit 8a2fbc9

Browse files
authored
Merge pull request #49 from ddanielgc/document-example-fix
docs: correct example of conditional chained transaction
2 parents c3678eb + 630f3d6 commit 8a2fbc9

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
@@ -252,7 +252,7 @@ let results = await mysql.transaction()
252252
.query('DELETE FROM table WHERE id = ?', [someVar])
253253
.query((r) => {
254254
if (r.affectedRows > 0) {
255-
['UPDATE anotherTable SET x = 1 WHERE id = ?', [someVar]]
255+
return ['UPDATE anotherTable SET x = 1 WHERE id = ?', [someVar]]
256256
} else {
257257
return null
258258
}

0 commit comments

Comments
 (0)