dyna-record
    Preparing search index...

    Type Alias IntersectKeysWithOr<T, KeyNames, F, SK>

    IntersectKeysWithOr: ResolveOrBlockEntityNames<T, F> extends infer OrNames
        ? ShouldNarrow<T, OrNames> extends true
            ? StrictIntersectWithSK<T, Extract<KeyNames, OrNames & string>, SK>
            : IntersectWithSK<T, KeyNames, SK>
        : IntersectWithSK<T, KeyNames, SK>

    When top-level filter keys narrow to KeyNames, also checks if $or blocks and skCondition narrow independently. Since DynamoDB ANDs top-level conditions with $or, a record must satisfy both — so the matching entities are the intersection. Additionally, skCondition is a key condition that always constrains the result.

    • If $or also narrows → intersect with KeyNames, then intersect with SK (strict).
    • If $or does not narrow → intersect KeyNames with SK.

    Type Parameters

    • T extends default
    • KeyNames extends string
    • F
    • SK = unknown