I am trying to run a DynamoDB query that says I want items that do not begin with a particular value. I cannot seem to find a way to do this.
I have tried the following 4 ways of evaluating, and none of them work. Each one gives me an invalid operator error.
My KeyConditionExpression(s) that I have tried look like this:
!begins_with(gameScoreId, :scoreScore) AND !begins_with(gameScoreId, :scoreLevel) AND userId = :userId
<>begins_with(gameScoreId, :scoreScore) AND <>begins_with(gameScoreId, :scoreLevel) AND userId = :userId
NOT begins_with(gameScoreId, :scoreScore) AND NOT begins_with(gameScoreId, :scoreLevel) AND userId = :userId
begins_with(gameScoreId, :scoreScore) = false AND begins_with(gameScoreId, :scoreLevel) = false AND userId = :userId
If I remove the not operators, I get this error:
KeyConditionExpressions must only contain one condition per key
Is there a way to do this in dynamodb?