Mick
Mick
Explore posts from servers
DTDrizzle Team
Created by Mick on 2/27/2024 in #help
How to reuse values within update().set() ? How to increment int?
The docs really need some reorganizing. Constantly cant find stuff. The "update" page is basically empty: https://orm.drizzle.team/docs/update
4 replies
DTDrizzle Team
Created by Mick on 2/27/2024 in #help
How to reuse values within update().set() ? How to increment int?
await db
.update(table)
.set({
counter: sql`${table.counter} - 1`,
})
.where(eq(table.id, 1));
await db
.update(table)
.set({
counter: sql`${table.counter} - 1`,
})
.where(eq(table.id, 1));
4 replies
DTDrizzle Team
Created by Mick on 2/27/2024 in #help
How to reuse values within update().set() ? How to increment int?
I found it in the "learn" page:
4 replies