Table of Contents

Interface ICountByKeyAction<TKey>

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

Defines a count operation keyed by a single value.

public interface ICountByKeyAction<TKey>

Type Parameters

TKey

The key type used to scope the count (e.g., account, characterId, guildId).

Remarks

Intended for service interfaces that expose a simple count scoped by a key. The key semantics and what is counted are defined by the specialized service.

Methods

CountAsync(TKey, CancellationToken)

Counts items for the given key.

Task<DatabaseResult<int>> CountAsync(TKey key, CancellationToken cancellationToken = default)

Parameters

key TKey

The key used to scope the count.

cancellationToken CancellationToken

Token to cancel the operation.

Returns

Task<DatabaseResult<int>>