method
LocalAPI.UpdateWithOptions
func (local *LocalAPI) UpdateWithOptions(
ctx context.Context,
collection,
id string,
values store.Values,
options MutationOptions,
) (store.Document, error)Update one document with optimistic concurrency and response controls.
Example
post, err := app.Local().UpdateWithOptions(
ctx,
"posts",
postID,
changes,
ridu.MutationOptions{
Actor: actor,
ExpectedRevision: currentRevision,
},
)Related types
LocalAPIIn-process content operations that share the REST authorization and lifecycle pipeline.
ValuesA map of field names to typed values.
MutationOptionsAuthorization, optimistic concurrency, response population, create status, and locale controls for one write.
DocumentA stored document with status and version metadata.