我有一個要求,在 Dynamodb 中查詢表時只需要返回一行。我可以在 aws-cli 中看到一個名為“max-items”的參數,它顯然限制了查詢的結果大小。這是示例查詢:aws dynamodb query --table-name testTable --key-condition-expression "CompositePartitionKey = :pk" --expression-attribute-values '{ ":pk": { "S": "1234_125" }, ":ps": { "S": "SOME_STATE" } }' --filter-expression 'StateAttribute IN (:ps) AND attribute_not_exists(AnotherAttribute)' --index-name GSI_PK_SK --endpoint-url http://localhost:8000 --max-items 1但我無法在 Go 中找出任何類似的關鍵字/屬性。
- 3 回答
- 0 關注
- 183 瀏覽
添加回答
舉報
0/150
提交
取消