aws-sdk-js-v3 icon indicating copy to clipboard operation
aws-sdk-js-v3 copied to clipboard

Valid comparisons for KeyConditionExpression explanation incomplete or incorrect

Open koabra opened this issue 1 year ago • 1 comments

Describe the issue

In the KeyConditionExpression parameter description, the Valid comparisons for the sort key condition are as incorrecly given, or illegible for different operators like less than, less than or equal to, greater than, greater than or equal to.

Everything is shown as such:

Valid comparisons for the sort key condition are as follows:

sortKeyName = :sortkeyval - true if the sort key value is equal to :sortkeyval. sortKeyName :sortkeyval - true if the sort key value is less than :sortkeyval. sortKeyName = :sortkeyval - true if the sort key value is less than or equal to :sortkeyval. sortKeyName :sortkeyval - true if the sort key value is greater than :sortkeyval. sortKeyName = :sortkeyval - true if the sort key value is greater than or equal to :sortkeyval.

Links

https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/dynamodb/command/QueryCommand/

koabra avatar Jan 15 '25 06:01 koabra

Hi @koabra - thanks for reporting this issue. I've noted that there are formatting issues there and will work on fixing them. Meanwhile, please refer to correct format content in the service documentation.

Valid comparisons for the sort key condition are as follows:

  • sortKeyName = :sortkeyval - true if the sort key value is equal to :sortkeyval.
  • sortKeyName < :sortkeyval - true if the sort key value is less than :sortkeyval.
  • sortKeyName <= :sortkeyval - true if the sort key value is less than or equal to :sortkeyval.
  • sortKeyName > :sortkeyval - true if the sort key value is greater than :sortkeyval.
  • sortKeyName >= :sortkeyval - true if the sort key value is greater than or equal to :sortkeyval.
  • sortKeyName BETWEEN :sortkeyval1 AND :sortkeyval2 - true if the sort key value is greater than or equal to :sortkeyval1, and less than or equal to :sortkeyval2.
  • begins_with ( sortKeyName, :sortkeyval ) - true if the sort key value begins with a particular operand. (You cannot use this function with a sort key that is of type Number.) Note that the function name begins_with is case-sensitive.

aBurmeseDev avatar Jan 16 '25 22:01 aBurmeseDev