Table of Contents

Class DeleteSnapshotsOlderThanRequest

Namespace
Excalibur.EventSourcing.SqlServer.Requests
Assembly
Excalibur.EventSourcing.SqlServer.dll

Data request to delete snapshots older than a specific version.

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

Constructors

DeleteSnapshotsOlderThanRequest(string, string, long, TenantScope, CancellationToken, string, string)

Initializes a new instance of the DeleteSnapshotsOlderThanRequest class.

public DeleteSnapshotsOlderThanRequest(string aggregateId, string aggregateType, long olderThanVersion, TenantScope scope, CancellationToken cancellationToken, string schema = "dbo", string table = "EventStoreSnapshots")

Parameters

aggregateId string

The aggregate identifier.

aggregateType string

The aggregate type name.

olderThanVersion long

Delete snapshots with version less than this value.

scope TenantScope

The tenant scope. The tenant predicate is emitted unconditionally — an untenanted scope binds the reserved sentinel rather than omitting the term — so the prune is restricted to one partition's rows (AND TenantId = @TenantId), so one tenant's retention policy cannot prune another tenant's snapshots of the same aggregate identifier.

cancellationToken CancellationToken

The cancellation token.

schema string

The schema name for the snapshot store table. Default: "dbo".

table string

The snapshot store table name. Default: "EventStoreSnapshots".