[BUG]: for("update", { noWait: true })
yields invalid SQL: syntax error at or near "no"
#3554
Open
1 task done
Labels
bug
Something isn't working
Report hasn't been filed before.
What version of
drizzle-orm
are you using?0.23.0
What version of
drizzle-kit
are you using?0.32.1-848e136
Other packages
No response
Describe the Bug
Given something like this, where
tx
is a Drizzle transaction.The resulting SQL looks like
That will result in the error
syntax error at or near "no"
because Postgres spells this option as a single word:This is confusing because the other option here is spelled as two words:
Fortunately this can be fixed by simply removing this space:
drizzle-orm/drizzle-orm/src/pg-core/dialect.ts
Lines 391 to 392 in 2677718
Relevant Postgres documentation:
https://www.postgresql.org/docs/16/sql-select.html#:~:text=The%20locking%20clause%20has,%5B%2C%20...%5D%20%5D%20%5B%20NOWAIT%20%7C%20SKIP%20LOCKED%20%5D
The text was updated successfully, but these errors were encountered: