A clause that translates to the $type operator. It tests to see if the associated attribute is of the specified type, returning a boolean result.
$type
It calls the attribute_type() function.
attribute_type()
The value is the DynamoDB type string to be tested (see https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.OperatorsAndFunctions.html#Expressions.OperatorsAndFunctions.Functions)
e.g. { x: { $type: 'L' } } (see if x is a list) => attribute_type(x, :v) (where :v = 'L')
{ x: { $type: 'L' } }
x
attribute_type(x, :v)
:v = 'L'
Generated using TypeDoc
A clause that translates to the
$type
operator. It tests to see if the associated attribute is of the specified type, returning a boolean result.It calls the
attribute_type()
function.The value is the DynamoDB type string to be tested (see https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.OperatorsAndFunctions.html#Expressions.OperatorsAndFunctions.Functions)
e.g.
{ x: { $type: 'L' } }
(see ifx
is a list) =>attribute_type(x, :v)
(where:v = 'L'
)