I am learning to use strapi, and have a question. How I do the database transaction like commit & rollback when using strapi & mySql ?
Thank You
You can create a transactions as follows
await strapi.connections.default.transaction(
async (trx) => {
//functions inside transaction
await trx.raw("insert into table..............")
});