drizzle-team / drizzle-orm

Headless TypeScript ORM with a head. Runs on Node, Bun and Deno. Lives on the Edge and yes, it's a JavaScript ORM too 😅
https://orm.drizzle.team
Apache License 2.0
24.54k stars 643 forks source link

[BUG]: Type Error in SQLiteTransaction - Missing $client Property After Upgrading to drizzle-orm@0.35.1 or 0.35.2 #3175

Open SamehAmnoun opened 4 weeks ago

SamehAmnoun commented 4 weeks ago

What version of drizzle-orm are you using?

0.35.2

What version of drizzle-kit are you using?

0.26.2

Describe the Bug

This typescript error appears after upgrading to either 0.35.1 or 0.35.2, which is due to the newly added $client property to the db type and while this property is not present in the transaction type.

This appears to be the same error as #3140 (but for PostgreSQL) which was fixed in the 0.35.2 release and the still open issue #3163 (but for MySQL)

Expected behavior

Any transaction PostgreSQL, MySQL or SQLite should be passable to its equivalent drizzle db type.

Environment & setup

Attempt to pass a transaction to a function that expects a typeof db

L-Mario564 commented 3 weeks ago

We'll address this soon for all dialect transactions.