A single, indivisible value DynamoDB can store: the types its scalar
attribute comparisons, sort key conditions, and filter operands accept.
dyna-record's own union rather than the SDK's NativeScalarAttributeValue,
which ends in an InstanceType<{ new (...args: any[]): any }> branch that
collapses the whole type to any. Owning it is what lets a filter value be
checked at all — a Date, a function, or a class instance is rejected here
rather than failing when the document client marshals it.
Three things are deliberately absent. Date, because dyna-record stores
dates as ISO strings, so a date is filtered and compared as the string it is
stored as. The SDK's NumberValue wrapper, which appears only under
unmarshallOptions.wrapNumbers — rejected on a supplied client since 3.2.0.
And the SDK's wider binary union, since dyna-record models no binary
attribute type.
A single, indivisible value DynamoDB can store: the types its scalar attribute comparisons, sort key conditions, and filter operands accept.
dyna-record's own union rather than the SDK's
NativeScalarAttributeValue, which ends in anInstanceType<{ new (...args: any[]): any }>branch that collapses the whole type toany. Owning it is what lets a filter value be checked at all — aDate, a function, or a class instance is rejected here rather than failing when the document client marshals it.Three things are deliberately absent.
Date, because dyna-record stores dates as ISO strings, so a date is filtered and compared as the string it is stored as. The SDK'sNumberValuewrapper, which appears only underunmarshallOptions.wrapNumbers— rejected on a supplied client since 3.2.0. And the SDK's wider binary union, since dyna-record models no binary attribute type.