Skip to content

Commit 11ff664

Browse files
fix durable sqlite transaction return value (#3746)
* fix durable sqlite transaction return value * 0.44.7 release --------- Co-authored-by: Andrii Sherman <andreysherman11@gmail.com>
1 parent 6caba5b commit 11ff664

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

changelogs/drizzle-orm/0.44.7.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- fix durable sqlite transaction return value #3746 - thanks @joaocstro

drizzle-orm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "drizzle-orm",
3-
"version": "0.44.6",
3+
"version": "0.44.7",
44
"description": "Drizzle ORM package for SQL databases",
55
"type": "module",
66
"scripts": {

drizzle-orm/src/durable-sqlite/session.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,7 @@ export class SQLiteDOSession<TFullSchema extends Record<string, unknown>, TSchem
6767
_config?: SQLiteTransactionConfig,
6868
): T {
6969
const tx = new SQLiteDOTransaction('sync', this.dialect, this, this.schema);
70-
this.client.transactionSync(() => {
71-
transaction(tx);
72-
});
73-
return {} as any;
70+
return this.client.transactionSync(() => transaction(tx));
7471
}
7572
}
7673

@@ -86,9 +83,7 @@ export class SQLiteDOTransaction<TFullSchema extends Record<string, unknown>, TS
8683

8784
override transaction<T>(transaction: (tx: SQLiteDOTransaction<TFullSchema, TSchema>) => T): T {
8885
const tx = new SQLiteDOTransaction('sync', this.dialect, this.session, this.schema, this.nestedIndex + 1);
89-
this.session.transaction(() => transaction(tx));
90-
91-
return {} as any;
86+
return this.session.transaction(() => transaction(tx));
9287
}
9388
}
9489

0 commit comments

Comments
 (0)