The related entity whose row the condition is evaluated against.
Optional$or?: SelfCondition<T>[]Condition blocks combined with OR. Each block is a condition on this same row: DynamoDB evaluates a condition against one item, so OR never spans rows.
// A Customer named Jane, or any Customer whose name starts with "J"
const customer: TargetCondition<Customer> = {
$or: [{ name: "Jane" }, { name: { $beginsWith: "J" } }]
};
// An active Customer with no phone on file
const reachable: TargetCondition<Customer> = { status: "active", phone: null };
// Any existing Customer
const exists: TargetCondition<Customer> = {};
A condition on a related entity's row, in the full query-filter vocabulary: equality,
INarrays,$beginsWith,$contains, the comparison operators,$between,$orand dot paths — withnullmeaning "not set" on a nullable attribute.Every guard on another row also requires that row to exist, so an empty condition (
{}) is a guard that the row exists.It is the value of a BelongsTo or HasOne key in a WriteCondition, of
conditionin a RelatedEntityCondition, and oftargetin a ForeignKeyTargetGuard. It names the related entity's own attributes only: a guard cannot reach a further row through the related entity's relationships.