@tursodatabase/serverless 1.1.2-pre.1 → 1.1.2

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.
package/dist/index.cjs CHANGED
@@ -870,9 +870,13 @@ var Connection = class {
870
870
  if (!this.isOpen) {
871
871
  throw new TypeError("The database connection is not open");
872
872
  }
873
- const session = new Session(this.config);
874
- const description = await session.describe(sql);
875
- await session.close();
873
+ await this.execLock.acquire();
874
+ let description;
875
+ try {
876
+ description = await this.session.describe(sql);
877
+ } finally {
878
+ this.execLock.release();
879
+ }
876
880
  const stmt = Statement.fromSession(this.session, sql, description.cols, this.execLock);
877
881
  if (this.defaultSafeIntegerMode) {
878
882
  stmt.safeIntegers(true);
package/dist/index.js CHANGED
@@ -868,9 +868,13 @@ var Connection = class {
868
868
  if (!this.isOpen) {
869
869
  throw new TypeError("The database connection is not open");
870
870
  }
871
- const session = new Session(this.config);
872
- const description = await session.describe(sql);
873
- await session.close();
871
+ await this.execLock.acquire();
872
+ let description;
873
+ try {
874
+ description = await this.session.describe(sql);
875
+ } finally {
876
+ this.execLock.release();
877
+ }
874
878
  const stmt = Statement.fromSession(this.session, sql, description.cols, this.execLock);
875
879
  if (this.defaultSafeIntegerMode) {
876
880
  stmt.safeIntegers(true);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tursodatabase/serverless",
3
- "version": "1.1.2-pre.1",
3
+ "version": "1.1.2",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",