< Summary - Heimdall API

Information
Class: ArturRios.Heimdall.Domain.Persistence.ScopeMemberIds
Assembly: ArturRios.Heimdall.Domain
File(s): /home/ci/agent/workspace/heimdall-api-docs_main/app/src/Domain/ArturRios.Heimdall.Domain/Persistence/IScopeCascades.cs
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 35
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage
100%
Covered methods: 4
Fully covered methods: 4
Total methods: 4
Method coverage: 100%
Full method coverage: 100%

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
get_ApplicationIds()100%11100%
get_GoogleUserIds()100%11100%
get_PersonIds()100%11100%

File(s)

/home/ci/agent/workspace/heimdall-api-docs_main/app/src/Domain/ArturRios.Heimdall.Domain/Persistence/IScopeCascades.cs

#LineLine coverage
 1namespace ArturRios.Heimdall.Domain.Persistence;
 2
 3/// <summary>The rows a hard-deleted scope takes with it, by internal id (UC-05 step 4).</summary>
 124public sealed record ScopeMemberIds(
 125    IReadOnlyCollection<long> ApplicationIds,
 126    IReadOnlyCollection<long> GoogleUserIds,
 247    IReadOnlyCollection<long> PersonIds);
 8
 9/// <summary>
 10///     The writes a scope's deletion cascades to its members (UC-04, UC-05), as set-based statements
 11///     that never load a member, run inside the caller's <see cref="IWriteTransaction" /> (#204).
 12/// </summary>
 13/// <remarks>
 14///     Loading every member to change a flag on each meant a tenant's whole membership — password hashes
 15///     included — tracked in memory inside one request, growing with the tenant. A statement per kind
 16///     of member keeps the request's memory flat, whatever the scope's size. The statements bypass the
 17///     change tracker and so write every column the tracked saves used to — the deletion's time and
 18///     kind, and <c>UpdatedAt</c> — themselves.
 19/// </remarks>
 20public interface IScopeCascades
 21{
 22    /// <summary>
 23    ///     UC-04 step 4: marks every User (via <c>SCOPE_USER</c>), Google User and application of the scope
 24    ///     that is not yet deleted as deleted at <paramref name="at" />, a deletion of kind
 25    ///     <c>Administrative</c> for the identities (NFR-20). Members already deleted keep the time and kind
 26    ///     of their own deletion. Scope owners are not touched.
 27    /// </summary>
 28    Task MarkMembersDeletedAsync(long scopeId, DateTime at);
 29
 30    /// <summary>
 31    ///     UC-05 step 4: permanently deletes <paramref name="members" /> — applications, then Google Users,
 32    ///     then persons, so no foreign key is violated — a bounded batch of ids per statement.
 33    /// </summary>
 34    Task DeleteMembersAsync(ScopeMemberIds members);
 35}