Class TombstoneArchivedEventsRequest
- Namespace
- Excalibur.EventSourcing.SqlServer.Requests
- Assembly
- Excalibur.EventSourcing.SqlServer.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 = "dbo", string table = "EventStoreEvents")
Parameters
tenantKeyedTenantPartitionThe tenant partition whose events are to be deleted.
aggregateIdstringThe aggregate identifier.
aggregateTypestringThe aggregate type name.
toVersionlongThe version up to which events are deleted (inclusive).
cancellationTokenCancellationTokenThe cancellation token.
schemastringThe schema name for the event store table. Default: "dbo".
tablestringThe event store table name. Default: "EventStoreEvents".