<i id='Vw5Hc'><tr id='Vw5Hc'><dt id='Vw5Hc'><q id='Vw5Hc'><span id='Vw5Hc'><b id='Vw5Hc'><form id='Vw5Hc'><ins id='Vw5Hc'></ins><ul id='Vw5Hc'></ul><sub id='Vw5Hc'></sub></form><legend id='Vw5Hc'></legend><bdo id='Vw5Hc'><pre id='Vw5Hc'><center id='Vw5Hc'></center></pre></bdo></b><th id='Vw5Hc'></th></span></q></dt></tr></i><div id='Vw5Hc'><tfoot id='Vw5Hc'></tfoot><dl id='Vw5Hc'><fieldset id='Vw5Hc'></fieldset></dl></div>
    <legend id='Vw5Hc'><style id='Vw5Hc'><dir id='Vw5Hc'><q id='Vw5Hc'></q></dir></style></legend>
  1. <tfoot id='Vw5Hc'></tfoot>
  2. <small id='Vw5Hc'></small><noframes id='Vw5Hc'>

      <bdo id='Vw5Hc'></bdo><ul id='Vw5Hc'></ul>

    1. 如何将新的键值对放入 DynamoDB 中的映射中?(爪哇

      时间:2023-09-28

    2. <i id='EioOz'><tr id='EioOz'><dt id='EioOz'><q id='EioOz'><span id='EioOz'><b id='EioOz'><form id='EioOz'><ins id='EioOz'></ins><ul id='EioOz'></ul><sub id='EioOz'></sub></form><legend id='EioOz'></legend><bdo id='EioOz'><pre id='EioOz'><center id='EioOz'></center></pre></bdo></b><th id='EioOz'></th></span></q></dt></tr></i><div id='EioOz'><tfoot id='EioOz'></tfoot><dl id='EioOz'><fieldset id='EioOz'></fieldset></dl></div>
        <legend id='EioOz'><style id='EioOz'><dir id='EioOz'><q id='EioOz'></q></dir></style></legend>

          1. <tfoot id='EioOz'></tfoot>

                <tbody id='EioOz'></tbody>
                <bdo id='EioOz'></bdo><ul id='EioOz'></ul>

                <small id='EioOz'></small><noframes id='EioOz'>

                本文介绍了如何将新的键值对放入 DynamoDB 中的映射中?(爪哇)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                我有一个 DynamoDB 属性,其值是从数字到字符串的映射.我正在尝试放入一个新的键值对.根据我的阅读,这似乎是可能的,但我不知道如何.

                I have a DynamoDB attribute whose value is a map from a Number to a String. I am trying to put in a new key-value pair. From what I've read, this seems to be possible, but I don't know how.

                我认为解决方案类似于以下链接中的解决方案:

                I assume the solution is similar to the one in the link below:

                如何在 AWS DynamoDB 文档 API 上更新地图或列表?

                但我不相信这个例子是在地图上添加一个新项目.有人可以告诉我如何将项目放入地图吗?

                But I do not believe the example is on putting in a new item to a map. Could someone show me how to put in an item to a map?

                谢谢.

                我不想获取该项目,在本地进行更改,然后将其放回原处.我正在与可能同时交互的多个客户合作(我假设 dynamo 的更新确保不会出现竞争条件).

                I do not want to get the item, locally make the changes, and put it back. I am working with multiple clients who might interact concurrently (and I assume the update by dynamo ensures there will be no race conditions).

                推荐答案

                使用 UpdateItem 的以下参数,当 map.#number 在地图中不存在时,您可以在 #number 处添加地图条目:

                With the following arguments to UpdateItem, you can condition adding a map entry at #number when map.#number does not exist in the map already:

                UpdateExpression = "SET map.#number = :string"
                ExpressionAttributeNames = { "#number" : "1" }
                ExpressionAttributeValues = { ":string" : "the string to store in the map at key value 1" }
                ConditionExpression = "attribute_not_exists(map.#number)"
                

                这篇关于如何将新的键值对放入 DynamoDB 中的映射中?(爪哇)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:用于条件保存的 DynamoDBMapper 下一篇:如何更新 AWS DynamoDB 文档 API 上的地图或列表?

                相关文章

                最新文章

              • <small id='8Yco4'></small><noframes id='8Yco4'>

                <legend id='8Yco4'><style id='8Yco4'><dir id='8Yco4'><q id='8Yco4'></q></dir></style></legend><tfoot id='8Yco4'></tfoot>
                  <bdo id='8Yco4'></bdo><ul id='8Yco4'></ul>

                    <i id='8Yco4'><tr id='8Yco4'><dt id='8Yco4'><q id='8Yco4'><span id='8Yco4'><b id='8Yco4'><form id='8Yco4'><ins id='8Yco4'></ins><ul id='8Yco4'></ul><sub id='8Yco4'></sub></form><legend id='8Yco4'></legend><bdo id='8Yco4'><pre id='8Yco4'><center id='8Yco4'></center></pre></bdo></b><th id='8Yco4'></th></span></q></dt></tr></i><div id='8Yco4'><tfoot id='8Yco4'></tfoot><dl id='8Yco4'><fieldset id='8Yco4'></fieldset></dl></div>