Class SqlClaimCheckRepository

Assembly: redb.Route.Sql.dll

SQL-backed implementation of .
Uses raw ADO.NET with — works with any DbProvider
(SQLite, PostgreSQL, MSSQL, MySQL).
Auto-creates the table on first use. Supports TTL-based lazy cleanup.

public sealed class SqlClaimCheckRepository : IClaimCheckRepository

Inheritance

Object→SqlClaimCheckRepository

Implements

Methods

Remove(string, CancellationToken)

Explicitly removes data by claim key.

public Task Remove(string key, CancellationToken ct = default)

Retrieve(string, CancellationToken)

Retrieves data by claim key without removing it.

public Task<byte[]?> Retrieve(string key, CancellationToken ct = default)

RetrieveAndRemove(string, CancellationToken)

Retrieves and removes data by claim key atomically.

public Task<byte[]?> RetrieveAndRemove(string key, CancellationToken ct = default)

Store(ReadOnlyMemory<byte>, TimeSpan?, CancellationToken)

Stores data under an auto-generated unique key.

public Task<string> Store(ReadOnlyMemory<byte> data, TimeSpan? ttl = null, CancellationToken ct = default)

Store(string, ReadOnlyMemory<byte>, TimeSpan?, CancellationToken)

Stores data under a specific key. Overwrites if key already exists.

public Task Store(string key, ReadOnlyMemory<byte> data, TimeSpan? ttl = null, CancellationToken ct = default)

Constructors

SqlClaimCheckRepository(ISqlConnectionFactory, SqlClaimCheckOptions)

Creates a new SQL-backed claim check repository.