Table of Contents

Class TombstoneArchivedEventsRequest

Namespace
Excalibur.EventSourcing.Postgres.Requests
Assembly
Excalibur.EventSourcing.Postgres.dll

Data request that deletes hot-tier events up to and including a version, for one tenant's aggregate.

public sealed class TombstoneArchivedEventsRequest : DataRequestBase<IDbConnection, int>, IDataRequest<IDbConnection, int>, IDataRequest
Inheritance
TombstoneArchivedEventsRequest
Implements
Inherited Members

Remarks

This is a destructive statement against a keyed (tenant-columned) table, so the tenant predicate is unconditional. The tenant term arrives as an explicit value rather than from ambient context: the archive service that calls this enumerates every tenant in a single pass, so there is no ambient tenant to inherit and inheriting one would delete under an arbitrary term. A deletion addressed by aggregate identifier alone would remove every tenant's events for that identifier, destroying events this run never archived.

Constructors

TombstoneArchivedEventsRequest(KeyedTenantPartition, string, string, long, CancellationToken, string, string)

Initializes a new instance of the TombstoneArchivedEventsRequest class.

public TombstoneArchivedEventsRequest(KeyedTenantPartition tenant, string aggregateId, string aggregateType, long toVersion, CancellationToken cancellationToken, string schema = "public", string table = "event_store_events")

Parameters

tenant KeyedTenantPartition

The tenant partition whose events are to be deleted.

aggregateId string

The aggregate identifier.

aggregateType string

The aggregate type name.

toVersion long

The version up to which events are deleted (inclusive).

cancellationToken CancellationToken

The cancellation token.

schema string

The schema name for the event store table. Default: "public".

table string

The event store table name. Default: "event_store_events".