一.resolve 当a>0时,正常情况依次输出A.B.C console.log("A"); let result = await this.test(); console.log("C:",result); private test(){ return new Promise((resolve,reject)=>{ console.log("B"); let a = 3; if(a > 0){ resolve(a); }el
错误出现: 含有错误的查询后,选中insert语句无法执行,报错current transaction is aborted, commands ignored until end of transaction block 分析: 事务中含有错误,再执行DML时,事务无法正常进行. 解决方法: 1.尝试connection.setAutoCommit(true);无法执行 2.直接commit ,提交后再执行insert语句,成功插入. 参考了stackoverflow的解法: https://