Dynamodb query - OR condition in KeyConditionExpression

后端 未结 2 2050
栀梦
栀梦 2021-01-01 21:44

I have a DynamoDB table with feed_guid as the global secondary index. I want to query with a set of feed_guid in that table. Since feed_guid<

2条回答
  •  庸人自扰
    2021-01-01 22:08

    You can't use OR condition. You should use

    rangeAttributeName BETWEEN :rangeval1 AND :rangeval2
    

    if possible or

    feed_guid IN (:v_guid1, :v_guid2)
    

    See ExpressionAttributeValues and KeyConditionExpression

提交回复
热议问题