Table of Contents

Interface IDeleteByKeyVersionedAction<TKey>

Namespace
FishMMO.Database.Npgsql.Services.Interfaces.Actions
Assembly
FishMMO-DB.dll

Defines a version-gated delete operation keyed by a single value.

public interface IDeleteByKeyVersionedAction<TKey>

Type Parameters

TKey

The key type used to locate the entity.

Remarks

Intended for service interfaces that enforce optimistic concurrency via a logical, monotonic version. Implementations should reject stale deletes when incomingVersion is not newer.

Methods

DeleteAsync(TKey, long, CancellationToken)

Deletes the entity identified by the given key if incomingVersion is newer.

Task<DatabaseResult> DeleteAsync(TKey key, long incomingVersion, CancellationToken cancellationToken = default)

Parameters

key TKey

The key used to locate the entity.

incomingVersion long

The authoritative, monotonic version for this delete operation.

cancellationToken CancellationToken

Token to cancel the operation.

Returns

Task<DatabaseResult>