We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca1033e commit 9acf9daCopy full SHA for 9acf9da
1 file changed
drizzle-orm/src/pg-core/session.ts
@@ -92,9 +92,11 @@ export abstract class PgPreparedQuery<T extends PreparedQueryConfig> implements
92
|| this.queryMetadata.type === 'delete'
93
) && this.queryMetadata.tables.length > 0
94
) {
95
- const result = await query();
96
- await this.cache.onMutate({ tables: this.queryMetadata.tables });
97
- return result;
+ const [res] = await Promise.all([
+ query(),
+ this.cache.onMutate({ tables: this.queryMetadata.tables }),
98
+ ]);
99
+ return res;
100
}
101
102
// don't do any reads if globally disabled
0 commit comments