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
TKeyThe 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
keyTKeyThe key used to scope the count.
cancellationTokenCancellationTokenToken to cancel the operation.