@tursodatabase/database 0.7.0-pre.1 → 0.7.0-pre.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.
@@ -284,3 +284,22 @@ test('example-2', async () => {
284
284
  { name: 'Bob', email: 'bob@example.com' }
285
285
  ]);
286
286
  });
287
+ test('transaction.concurrent uses BEGIN CONCURRENT', async () => {
288
+ const db = await connect(':memory:');
289
+ const originalExec = db.exec;
290
+ const calls = [];
291
+ db.exec = async (sql) => {
292
+ calls.push(sql);
293
+ };
294
+ try {
295
+ const txn = db.transaction(async () => {
296
+ calls.push('body');
297
+ }).concurrent;
298
+ await txn();
299
+ expect(calls).toEqual(['BEGIN CONCURRENT', 'body', 'COMMIT']);
300
+ }
301
+ finally {
302
+ db.exec = originalExec;
303
+ await db.close();
304
+ }
305
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tursodatabase/database",
3
- "version": "0.7.0-pre.1",
3
+ "version": "0.7.0-pre.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/tursodatabase/turso"
@@ -47,15 +47,15 @@
47
47
  ]
48
48
  },
49
49
  "dependencies": {
50
- "@tursodatabase/database-common": "^0.7.0-pre.1"
50
+ "@tursodatabase/database-common": "^0.7.0-pre.2"
51
51
  },
52
52
  "imports": {
53
53
  "#index": "./index.js"
54
54
  },
55
55
  "optionalDependencies": {
56
- "@tursodatabase/database-linux-x64-gnu": "0.7.0-pre.1",
57
- "@tursodatabase/database-win32-x64-msvc": "0.7.0-pre.1",
58
- "@tursodatabase/database-darwin-arm64": "0.7.0-pre.1",
59
- "@tursodatabase/database-linux-arm64-gnu": "0.7.0-pre.1"
56
+ "@tursodatabase/database-linux-x64-gnu": "0.7.0-pre.2",
57
+ "@tursodatabase/database-win32-x64-msvc": "0.7.0-pre.2",
58
+ "@tursodatabase/database-darwin-arm64": "0.7.0-pre.2",
59
+ "@tursodatabase/database-linux-arm64-gnu": "0.7.0-pre.2"
60
60
  }
61
61
  }