Skip to content

UpdateBuilder

UpdateBuilder = object

Defined in: packages/db/src/types.ts:493

Builder for update operations on a single table.

Returned by db.update(table). Chain .set() to specify values, then .where() to add a condition, and optionally .returning() to get the updated row back.

await db.update(posts)
.set({ published: true })
.where(eq(posts.id, "abc-123"))
.run({});

set: (values) => UpdateWhereBuilder

Defined in: packages/db/src/types.ts:495

Specifies the column values to update, returning an UpdateWhereBuilder.

Record<string, unknown>

UpdateWhereBuilder