method

LocalAPI.UpdateRevision

func (local *LocalAPI) UpdateRevision( ctx context.Context, collection, id string, values store.Values, expectedRevision int, actor *store.Document, localeOptions ...LocaleOptions, ) (store.Document, error)

Update with an optimistic current-revision fence.

Source core/local.go:500

@param ctx
The ctx value.
@param collection
The collection value.
@param id
The id value.
@param values
The values value.
@param expectedRevision
The expectedRevision value.
@param actor
The actor value.
@param localeOptions
The localeOptions value.
@returns
The declared result.

Equivalent to UpdateWithOptions with ExpectedRevision set. A stale revision returns a conflict.

Related types

  • LocalAPI

    In-process content operations that share the REST authorization and lifecycle pipeline.

  • Values

    A map of field names to typed values.

  • Document

    A stored document with status and version metadata.

  • LocaleOptions

    Locale selection for one single-document Local API operation.