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

      <legend id='j8YQl'><style id='j8YQl'><dir id='j8YQl'><q id='j8YQl'></q></dir></style></legend>

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

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

        DynamoDB:仅当它已经存在时才更新项目

        DynamoDB: updateItem only if it already exists(DynamoDB:仅当它已经存在时才更新项目)

      1. <legend id='kTtVv'><style id='kTtVv'><dir id='kTtVv'><q id='kTtVv'></q></dir></style></legend>
      2. <tfoot id='kTtVv'></tfoot>

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

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

                  本文介绍了DynamoDB:仅当它已经存在时才更新项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  默认情况下,如果具有指定索引的对象不存在,DynamoDB 将创建一个新条目.有没有办法阻止这种情况发生?我可以在更新之前在表中查询密钥,但最好在一个请求中完成所有操作.

                  By default DynamoDB will make a new entry if an object with the specified index doesn't exist. Is there a way to stop this from occurring? I could just query the table for the key before updating, but it would be nice to do it all in one request.

                  推荐答案

                  使用条件表达式 id = :id 其中 id 是属性名(或主键名您的情况)和 :id 是值(您要更新的项目的键).

                  Use conditional expression id = :id where id is the attribute name (or primary key name in your case) and :id is the value (key of the item you want to update).

                  条件表达式总是在任何写入之前进行评估.如果该表达式的计算结果不是 true(并且如果该键不存在或不同,则不会),它不会更新或放置新项目.

                  Conditional expression is always evaluated before any writing. If that expression doesn't evaluate to true (and it doesn't if that key doesn't exist or is different), it doesn't update or put a new item.

                  这篇关于DynamoDB:仅当它已经存在时才更新项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)

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

                      • <tfoot id='b3OKe'></tfoot>

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

                            <legend id='b3OKe'><style id='b3OKe'><dir id='b3OKe'><q id='b3OKe'></q></dir></style></legend>