Update builds UPDATE queries.
import Update from '@stackpress/inquire/Update';Most code uses it through engine.update(table).
await engine.update('users')
.set({ active: false })
.where('last_login < ?', [new Date('2024-01-01')]);Set the column values to update.
Add a WHERE clause.
Add a JSON comparison filter.
Add a JSON containment filter.
Return the internal update state.
Return one QueryObject.
Execute the query through the attached engine.
Update also exposes writable configuration properties:
| Property | Default |
|---|---|
selector |
: |
separator |
. |
These affect JSON selector parsing.
When awaited, Update<R> resolves to R[].