久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <tfoot id='RmBHw'></tfoot>
  1. <small id='RmBHw'></small><noframes id='RmBHw'>

    1. <legend id='RmBHw'><style id='RmBHw'><dir id='RmBHw'><q id='RmBHw'></q></dir></style></legend>

      • <bdo id='RmBHw'></bdo><ul id='RmBHw'></ul>
    2. <i id='RmBHw'><tr id='RmBHw'><dt id='RmBHw'><q id='RmBHw'><span id='RmBHw'><b id='RmBHw'><form id='RmBHw'><ins id='RmBHw'></ins><ul id='RmBHw'></ul><sub id='RmBHw'></sub></form><legend id='RmBHw'></legend><bdo id='RmBHw'><pre id='RmBHw'><center id='RmBHw'></center></pre></bdo></b><th id='RmBHw'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='RmBHw'><tfoot id='RmBHw'></tfoot><dl id='RmBHw'><fieldset id='RmBHw'></fieldset></dl></div>

      用于條件保存的 DynamoDBMapper

      DynamoDBMapper for conditional saves(用于條件保存的 DynamoDBMapper)

      <legend id='35Ufc'><style id='35Ufc'><dir id='35Ufc'><q id='35Ufc'></q></dir></style></legend>
            <bdo id='35Ufc'></bdo><ul id='35Ufc'></ul>
          • <small id='35Ufc'></small><noframes id='35Ufc'>

                <i id='35Ufc'><tr id='35Ufc'><dt id='35Ufc'><q id='35Ufc'><span id='35Ufc'><b id='35Ufc'><form id='35Ufc'><ins id='35Ufc'></ins><ul id='35Ufc'></ul><sub id='35Ufc'></sub></form><legend id='35Ufc'></legend><bdo id='35Ufc'><pre id='35Ufc'><center id='35Ufc'></center></pre></bdo></b><th id='35Ufc'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='35Ufc'><tfoot id='35Ufc'></tfoot><dl id='35Ufc'><fieldset id='35Ufc'></fieldset></dl></div>
                  <tbody id='35Ufc'></tbody>
                <tfoot id='35Ufc'></tfoot>

                本文介紹了用于條件保存的 DynamoDBMapper的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                我正在使用 DynamoDBMapper,并且希望有條件地保存當且僅當 hashkey 和 range 鍵組合不存在時.我知道有一些方法可以使用 UUID 來減少發(fā)生沖突的可能性,但我想通過使用條件保存來保護自己.

                I'm using DynamoDBMapper and would like to conditionally save if and only if the hashkey and range key combination does not exist. I know there are ways to use UUIDs to reduce the possibility of a collision but I would like to protect myself by using conditional saves.

                我遇到了這篇文章 使用 DynamoDBSaveExpression 但是我無法指定條件是hashkey AND rangekey"不能存在.API 指定withConditionalOperator 方法,但我在課堂上看不到這個.我也在使用來自 here 的最新 aws java sdk.

                I came across this article that uses DynamoDBSaveExpression however I'm not able to specify that the condition is "hashkey AND rangekey" cannot exist. The API specifies a withConditionalOperator method but I'm not able to see this in my class. I am using the latest aws java sdk also from here.

                關于如何有條件地保存的任何建議?或者我可能做錯了什么?

                Any suggestions on how to conditionally save? Or what I may be doing incorrectly?

                推薦答案

                DynamoDBSaveExpression saveExpression = new DynamoDBSaveExpression();
                Map<String, ExpectedAttributeValue> expectedAttributes = 
                    ImmutableMap.<String, ExpectedAttributeValue>builder()
                        .put("hashKey", new ExpectedAttributeValue(false))
                        .put("rangeKey", new ExpectedAttributeValue(false))
                        .build();
                saveExpression.setExpected(expectedAttributes);
                saveExpression.setConditionalOperator(ConditionalOperator.AND);
                try {
                    dynamoDBMapper.save(objectToSave, saveExpression);
                } catch (ConditionalCheckFailedException e) {
                    //Handle conditional check
                }
                

                這使用 public ExpectedAttributeValue(Boolean exists) 構造函數,它只是在內部調用 setExists.

                This uses the public ExpectedAttributeValue(Boolean exists) constructor, which just internally calls setExists.

                這篇關于用于條件保存的 DynamoDBMapper的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                【網站聲明】本站部分內容來源于互聯(lián)網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯(lián)系我們刪除處理,感謝您的支持!

                相關文檔推薦

                How can I detect integer overflow on 32 bits int?(如何檢測 32 位 int 上的整數溢出?)
                Local variables before return statements, does it matter?(return 語句之前的局部變量,這有關系嗎?)
                How to convert Integer to int?(如何將整數轉換為整數?)
                How do I create an int array with randomly shuffled numbers in a given range(如何在給定范圍內創(chuàng)建一個隨機打亂數字的 int 數組)
                Inconsistent behavior on java#39;s ==(java的行為不一致==)
                Why is Java able to store 0xff000000 as an int?(為什么 Java 能夠將 0xff000000 存儲為 int?)
                <tfoot id='HfOW6'></tfoot>

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

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

                            <tbody id='HfOW6'></tbody>

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

                          <legend id='HfOW6'><style id='HfOW6'><dir id='HfOW6'><q id='HfOW6'></q></dir></style></legend>
                          主站蜘蛛池模板: 国产精品一区二区av | 天天色天天色 | 久久久人成影片免费观看 | 在线看h| 亚洲另类春色偷拍在线观看 | 亚洲国产精品成人无久久精品 | 久久久精彩视频 | 自拍第1页 | 天天碰夜夜操 | 午夜精品视频在线观看 | 午夜性色a√在线视频观看9 | 午夜看看 | 日韩伦理电影免费在线观看 | 毛片免费视频 | 夜久久 | 日韩精品视频在线观看一区二区三区 | 欧美影院| 日日骑| 黄色毛片免费 | 亚洲资源站 | 五月婷婷丁香婷婷 | 伊人一区| 亚洲国产情侣自拍 | 成人h免费观看视频 | 久久一二区| 五月婷婷色 | 天天干狠狠 | 欧美久久一区二区三区 | 伊人久久麻豆 | 看亚洲a级一级毛片 | 在线久草| 日韩精品久久久 | 在线观看亚洲精品 | 欧美精品一级 | 日本特黄特色aaa大片免费 | 国产精品久久久久久久久久 | 国产成人亚洲精品 | 色综合欧美 | 黄久久久 | 欧美亚洲另类丝袜综合网动图 | 综合视频在线 |