StandardUpdateOptions
StandardUpdateOptions<
TTable> =object
Defined in: define/table/types/query.ts:105
Defines the options available for an UPDATE query using SurrealDB 2.0 builder pattern.
Example
Section titled “Example”// Full content replacement (UPDATE)await User.update(db, userId, { data: { name: 'John', age: 30 }, mode: 'content'});
// Partial merge (MERGE/PATCH)await User.update(db, userId, { data: { age: 31 }, mode: 'merge'});
// JSON Patch operationsawait User.update(db, userId, { data: [{ op: 'replace', path: '/age', value: 31 }], mode: 'patch'});Type Parameters
Section titled “Type Parameters”TTable
Section titled “TTable”TTable
The data shape of the table being updated.
Properties
Section titled “Properties”data:
Partial<TTable>
Defined in: define/table/types/query.ts:106
mode:
Exclude<UpdateMode,"patch">
Defined in: define/table/types/query.ts:107