Skip to content
🚀 This documentation is for unreal-orm 1.0.0 alpha which requires SurrealDB 2.0 alpha SDK. For the stable version, see npm.

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.

// 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 operations
await User.update(db, userId, {
data: [{ op: 'replace', path: '/age', value: 31 }],
mode: 'patch'
});

TTable

The data shape of the table being updated.

data: Partial<TTable>

Defined in: define/table/types/query.ts:106


mode: Exclude<UpdateMode, "patch">

Defined in: define/table/types/query.ts:107