drizzle-orm icon indicating copy to clipboard operation
drizzle-orm copied to clipboard

[BUG]: better-sqlite3 CTEs should support `INSERT`, `UPDATE`, `DELETE`

Open spiffytech opened this issue 2 years ago • 2 comments

What version of drizzle-orm are you using?

0.23.2

Describe the Bug

SQLite supports common table expressions for INSERT, UPDATE, and DELETE.

Drizzle's better-sqlite3 driver's db.with(...) only has a select property, and so appears to not support CTEs on other query types.

spiffytech avatar Mar 30 '23 18:03 spiffytech

Didn't know that! Thanks, will put it on the roadamp.

dankochetov avatar Mar 30 '23 19:03 dankochetov

👍 Adding that Postgres also supports WITH with SELECT, INSERT, UPDATE, or DELETE queries.

tmcw avatar Apr 24 '23 20:04 tmcw

Was released in [email protected]

https://github.com/drizzle-team/drizzle-orm/releases/tag/0.29.5

AndriiSherman avatar Mar 06 '24 19:03 AndriiSherman