dyna-record
    Preparing search index...

    Type Alias BetweenConditionFor<V>

    BetweenConditionFor:
        | BetweenOfKind<Extract<V, Date>>
        | BetweenOfKind<Extract<V, string>>
        | BetweenOfKind<Extract<V, number>>
        | BetweenOfKind<Extract<V, bigint>>
        | BetweenOfKind<Extract<V, Uint8Array>>

    $between, offered only where DynamoDB can order the attribute's stored form.

    BETWEEN is a pair of comparisons, so it takes exactly the operands ComparisonConditionFor does, built the same way: per comparable kind, so both bounds may be any two members of an enum while a string bound never pairs with a number one. DynamoDB requires both bounds to share a type.

    Type Parameters

    • V

      The attribute's declared type.

    // An enum is stored as a string, so any two members bound a range,
    // ordered lexicographically
    filter: { status: { $between: ["cancelled", "pending"] } }

    // The same range composed from two comparisons
    filter: { status: { $gte: "cancelled", $lte: "pending" } }