IEntityUpdateInfo<TEntity>
Namespace: Meshmakers.Octo.Runtime.Contracts
Interface for an entity update info.
public interface IEntityUpdateInfo<TEntity>
Type Parameters
TEntity
Properties
RtEntity
Entity for modification.
public abstract TEntity RtEntity { get; }
Property Value
TEntity
RtId
Runtime Identifier of an existing entity.
public abstract Nullable<OctoObjectId> RtId { get; }
Property Value
CkTypeId
Construction Kit Type Identifier of entity to be modified.
public abstract RtCkId<CkTypeId> CkTypeId { get; }
Property Value
RtCkId<CkTypeId>
ModOption
MOD option.
public abstract EntityModOptions ModOption { get; }
Property Value
UpdateGuard
Optional optimistic-concurrency guard applied to EntityModOptions.Update operations. When set, the write is skipped if the guard does not match — see AttributeNewerThanGuard. Ignored for non-update mod options.
public abstract AttributeNewerThanGuard UpdateGuard { get; }
Property Value
ExpectedRtVersion
Optional optimistic-concurrency check on RtEntity.RtVersion for
EntityModOptions.Update and EntityModOptions.Replace: the write is applied
only if the stored entity still has exactly this version, and the stored version then becomes
expected + 1. If another writer changed the entity in between, nothing is written and the repository
throws RtVersionConflictException (never a silent skip). null = no check.
Cannot be combined with IEntityUpdateInfo<TEntity>.UpdateGuard. Ignored for insert and delete.
public Nullable<ulong> ExpectedRtVersion { get; }
Property Value
ClearSecretAttributes
Names (PascalCase, as in RtTypeWithAttributes.Attributes) of top-level
Secret attributes to clear explicitly (concept §4.3 clearSecretAttributes).
Clearing is the only way to remove a stored secret through an update: an omitted, ""
or (at the API) null secret means "unchanged". Applies to
EntityModOptions.Update and EntityModOptions.Replace; on
EntityModOptions.Insert a listed attribute is simply not set. The rule engine
rejects a name that is not a Secret attribute of the type, a required secret, and a
non-empty value for the same attribute in the same operation.
null or empty = nothing to clear.
public IReadOnlyCollection<string> ClearSecretAttributes { get; }
Property Value
RecordArrayItemUpdates
Atomic updates of single items of RecordArray attributes. Each entry changes the item
whose match member equals the match value, in one statement together with the regular attribute updates
of IEntityUpdateInfo<TEntity>.RtEntity, without reading the stored entity first - see
RtRecordArrayItemUpdate. Applies to EntityModOptions.Update only. A
whole-value update of the same RecordArray in IEntityUpdateInfo<TEntity>.RtEntity is refused as ambiguous.
When no entry matches an item (and IEntityUpdateInfo<TEntity>.RtEntity carries no attribute to write), nothing is
written and the repository reports a warning. null or empty = no item updates.
public IReadOnlyCollection<RtRecordArrayItemUpdate> RecordArrayItemUpdates { get; }
Property Value
IReadOnlyCollection<RtRecordArrayItemUpdate>
Methods
GetRtEntityId()
Gets the runtime entity identifier.
RtEntityId GetRtEntityId()
Returns
RtEntityId