@asla/yoursql 0.8.6 → 0.8.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -34,19 +34,20 @@ class DbPoolTransaction extends DbQuery {
34
34
  }, (e) => {
35
35
  // 语法错误、查询错误、网络错误
36
36
  this.#pending = undefined;
37
- reject(e);
38
37
  const conn = this.#conn;
39
- if (!conn)
38
+ if (!conn) {
39
+ reject(e);
40
40
  return;
41
- if (this.#errorRollback) {
42
- const onFinally = () => {
43
- this.#release(conn, e);
44
- };
45
- return conn.rollback().then(onFinally, onFinally);
46
41
  }
47
- else {
42
+ const onFinally = () => {
48
43
  this.#release(conn, e);
44
+ reject(e);
45
+ };
46
+ if (this.#errorRollback) {
47
+ return conn.rollback().then(onFinally, onFinally);
49
48
  }
49
+ else
50
+ onFinally();
50
51
  });
51
52
  });
52
53
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asla/yoursql",
3
- "version": "0.8.6",
3
+ "version": "0.8.7",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "types": "./dist/mod.d.ts",