1. <legend id='5FFv2'><style id='5FFv2'><dir id='5FFv2'><q id='5FFv2'></q></dir></style></legend>
        <bdo id='5FFv2'></bdo><ul id='5FFv2'></ul>

      <small id='5FFv2'></small><noframes id='5FFv2'>

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

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

      How to put a new key-value pair into a map in DynamoDB? (java)(如何将新的键值对放入 DynamoDB 中的映射中?(爪哇))
        <bdo id='wUi9B'></bdo><ul id='wUi9B'></ul>
          <tbody id='wUi9B'></tbody>

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

              • 本文介绍了如何将新的键值对放入 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 中的映射中?(爪哇)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                How to send data to COM PORT using JAVA?(如何使用 JAVA 向 COM PORT 发送数据?)
                How to make a report page direction to change to quot;rtlquot;?(如何使报表页面方向更改为“rtl?)
                Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)
                Is there any way to detect an RTL language in Java?(有没有办法在 Java 中检测 RTL 语言?)
                How to load resource bundle messages from DB in Java?(如何在 Java 中从 DB 加载资源包消息?)
                How do I change the default locale settings in Java to make them consistent?(如何更改 Java 中的默认语言环境设置以使其保持一致?)

                  1. <tfoot id='AdOys'></tfoot>
                    • <small id='AdOys'></small><noframes id='AdOys'>

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

                        • <bdo id='AdOys'></bdo><ul id='AdOys'></ul>