Table of Contents

Enum TenantConfinement

Namespace
Excalibur.Data
Assembly
Excalibur.Data.Abstractions.dll

The argument that makes it correct for a relational data request to carry no tenant term.

public enum TenantConfinement

Fields

EstateWide = 0

The statement addresses the whole estate on purpose.

The operation takes no tenant and its result carries no tenant field, so a confined answer could not tell its caller which partition it described. Operator statistics, health reads, retention purges and the cross-tenant delivery drain are all of this kind. Adding a tenant term here does not harden the statement; it makes it report or act on the wrong population.

ForeignKeyConfined = 2

The statement is reached through a foreign key to a row that is itself confined.

Every row the statement can match belongs to the one parent the caller named, so no other tenant's row is reachable even when the filtered columns are not themselves a key. This is a different argument from IdentityAddressed and does not follow from it: it bounds which rows exist, not how many.

IdentityAddressed = 1

The statement is addressed by a globally unique key the caller already holds.

WHERE Id = @X selects at most one row. WHERE Id = @X AND TenantId = @T selects a subset of at most one row, which is that row or nothing — so the tenant term cannot cause a different row to be addressed, because there is no other row available to address. Its only reachable effect is to turn the correct row into zero rows.

This holds regardless of the identifier's entropy: the exposure comes from the operation accepting a caller-supplied identifier at all, not from the missing tenant term. On a read the trade is real rather than free — a tenant term would have made the result empty for a caller scoped to a different tenant than the identifier it supplied — so a read using this kind states that trade in its justification and on its public surface.

NoTenantDimension = 3

The table declares no tenant column, so there is no term to bind.

A statement about the schema as it exists, not a judgement that tenant-owned work never flows through the table. If the table later gains a tenant column this justification expires, which is why the kind is recorded separately from the others rather than folded into them.

Remarks

A statement without a tenant term is correct for several unrelated reasons, and they are not interchangeable. Recording only that a request is "not tenant-scoped" produces an index in which an operator report and a primary-key update are the same entry, so a reviewer auditing estate-wide reach has to re-read every statement to find the ones that actually have it. The kind is what makes the index answerable.