Transaction issue with knexjs, typescript and mariadb

前端 未结 2 1410
野趣味
野趣味 2021-01-15 12:32

I want to have a transaction, in typescript, to refresh some data in a table. To do so the following steps need to apply:

  1. Truncate all the records from a table
2条回答
  •  感情败类
    2021-01-15 13:26

    With mysql all schema altering DDL queries does implicit commit and they cannot be rolled back. So you need to change your implementation to guarantee integrity of db in some other way.

    https://dev.mysql.com/doc/refman/8.0/en/cannot-roll-back.html https://dev.mysql.com/doc/refman/8.0/en/implicit-commit.html

提交回复
热议问题