function update
update(
table: string,
set: Record<string, InValue | RawSql>,
where: Record<string, InValue>,
): SqlStatement

Build an UPDATE statement, the WHERE record ANDed as equality checks. SET values may be rawSql expressions, such as a counter increment. A write needing a richer guard — IS NULL, an inequality, a subquery — keeps its own SQL rather than bending this one.

Parameters

table: string
set: Record<string, InValue | RawSql>
where: Record<string, InValue>

Return Type

Usage

import { update } from "doc.ts";