Skip to content

Commit fb44d08

Browse files
committed
update
1 parent 502e443 commit fb44d08

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

packages/runtime/src/client/executor/zenstack-driver.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,9 @@ export class ZenStackDriver implements Driver {
8383
}
8484
}
8585
return result;
86-
} catch {
86+
} catch (err) {
8787
this.#txConnections.delete(connection);
88+
throw err;
8889
}
8990
}
9091

packages/runtime/src/client/executor/zenstack-query-executor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export class ZenStackQueryExecutor<Schema extends SchemaDef> extends DefaultQuer
6868
await this.callBeforeMutationHooks(queryNode, mutationInterceptionInfo);
6969
}
7070

71-
// TODO: make sure insert and delete return rows
71+
// TODO: make sure insert and update return rows
7272
const oldQueryNode = queryNode;
7373
if (
7474
(InsertQueryNode.is(queryNode) || UpdateQueryNode.is(queryNode)) &&

packages/runtime/test/plugin/mutation-hooks.test.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -362,17 +362,14 @@ describe('Entity lifecycle tests', () => {
362362
});
363363

364364
await client.$transaction(async (tx) => {
365-
const user1 = await tx.user.create({
365+
await tx.user.create({
366366
data: { email: '[email protected]' },
367367
});
368-
console.log('Created:', user1);
369-
const user2 = await tx.user.update({
368+
await tx.user.update({
370369
where: { email: '[email protected]' },
371370
data: { email: '[email protected]' },
372371
});
373-
console.log('Updated:', user2);
374-
const user3 = await tx.user.delete({ where: { email: '[email protected]' } });
375-
console.log('Deleted:', user3);
372+
await tx.user.delete({ where: { email: '[email protected]' } });
376373
});
377374

378375
expect(triggered).toEqual([

0 commit comments

Comments
 (0)