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

<legend id='aGH2H'><style id='aGH2H'><dir id='aGH2H'><q id='aGH2H'></q></dir></style></legend>
  • <tfoot id='aGH2H'></tfoot>
  • <small id='aGH2H'></small><noframes id='aGH2H'>

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

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

        在 Java 中使用 DynamoDBMapper 更新 DynamoDB 項目

        Update DynamoDB item using DynamoDBMapper in Java(在 Java 中使用 DynamoDBMapper 更新 DynamoDB 項目)

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

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

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

                <bdo id='zC4rQ'></bdo><ul id='zC4rQ'></ul>
                <i id='zC4rQ'><tr id='zC4rQ'><dt id='zC4rQ'><q id='zC4rQ'><span id='zC4rQ'><b id='zC4rQ'><form id='zC4rQ'><ins id='zC4rQ'></ins><ul id='zC4rQ'></ul><sub id='zC4rQ'></sub></form><legend id='zC4rQ'></legend><bdo id='zC4rQ'><pre id='zC4rQ'><center id='zC4rQ'></center></pre></bdo></b><th id='zC4rQ'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='zC4rQ'><tfoot id='zC4rQ'></tfoot><dl id='zC4rQ'><fieldset id='zC4rQ'></fieldset></dl></div>
                  <tbody id='zC4rQ'></tbody>
                  本文介紹了在 Java 中使用 DynamoDBMapper 更新 DynamoDB 項目的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  如何使用 DynamoDBMapper 更新 DynamoDB 項目?

                  How can I update DynamoDB item using DynamoDBMapper?

                  我有多個進程,使用 DynamoDB 表,因此,get + save 會造成不一致.我找不到使用 DynamoDBMapper 更新項目的方法.

                  I have multiple processes, using the DynamoDB table, thus, get + save will create inconsistency. I can not find the method to update the item using DynamoDBMapper.

                  推薦答案

                  save()方法會執(zhí)行putItemupdateItem 基于 SaveBehavior 中設(shè)置的值.請參考以下說明.由于這個原因,DynamoDBMapper 類中沒有更新方法.但是,有一個單獨的刪除方法可用.

                  The save() method will perform the putItem or updateItem based on the value set in SaveBehavior. Please refer the below description. There is no update method in DynamoDBMapper class because of this reason. However, there is a separate delete method available.

                  在 DynamoDB 中保存項目.使用的服務(wù)方法由DynamoDBMapperConfig.getSaveBehavior() 值,使用任一AmazonDynamoDB.putItem(PutItemRequest) 或AmazonDynamoDB.updateItem(UpdateItemRequest):

                  Saves an item in DynamoDB. The service method used is determined by the DynamoDBMapperConfig.getSaveBehavior() value, to use either AmazonDynamoDB.putItem(PutItemRequest) or AmazonDynamoDB.updateItem(UpdateItemRequest):

                  更新(默認):UPDATE 不會影響保存操作和建模屬性的 null 值會將其從該項目中刪除動態(tài)數(shù)據(jù)庫.由于 updateItem 請求的限制,當只有鍵時,UPDATE 的實現(xiàn)將發(fā)送 putItem 請求對象正在被保存,如果它會發(fā)送另一個 updateItem 請求給定的鍵已經(jīng)存在于表中.

                  UPDATE (default) : UPDATE will not affect unmodeled attributes on a save operation and a null value for the modeled attribute will remove it from that item in DynamoDB. Because of the limitation of updateItem request, the implementation of UPDATE will send a putItem request when a key-only object is being saved, and it will send another updateItem request if the given key(s) already exists in the table.

                  UPDATE_SKIP_NULL_ATTRIBUTES : 與 UPDATE 類似,只是它忽略任何空值屬性,并且不會將它們從該項目中刪除動態(tài)數(shù)據(jù)庫.它還保證只發(fā)送一個 updateItem請求,無論對象是否僅鍵.

                  UPDATE_SKIP_NULL_ATTRIBUTES : Similar to UPDATE except that it ignores any null value attribute(s) and will NOT remove them from that item in DynamoDB. It also guarantees to send only one single updateItem request, no matter the object is key-only or not.

                  CLOBBER: CLOBBER將清除并替換所有屬性,包括未建模的屬性,(刪除并重新創(chuàng)建)保存.版本化的字段約束也將被忽視.saveExpression 參數(shù)中指定的任何選項由于版本化屬性,將覆蓋在任何約束上.

                  CLOBBER : CLOBBER will clear and replace all attributes, included unmodeled ones, (delete and recreate) on save. Versioned field constraints will also be disregarded. Any options specified in the saveExpression parameter will be overlaid on any constraints due to versioned attributes.

                  用法示例:-

                  DynamoDBMapperConfig dynamoDBMapperConfig = new DynamoDBMapperConfig(SaveBehavior.UPDATE);
                  

                  更新 DynamoDBMapperConfig (aws sdk 1.11.473) 構(gòu)造函數(shù)似乎已被棄用,應(yīng)該改用構(gòu)建器:

                  UPDATE DynamoDBMapperConfig (aws sdk 1.11.473) constructor seems to be deprecated and the builder should be used instead:

                  DynamoDBMapperConfig dynamoDBMapperConfig = new DynamoDBMapperConfig.Builder()
                    .withConsistentReads(DynamoDBMapperConfig.ConsistentReads.CONSISTENT)
                    .withSaveBehavior(DynamoDBMapperConfig.SaveBehavior.UPDATE)
                    .build();
                  dynamoDBMapper.save(yourObject, dynamoDBMapperConfig);
                  

                  這篇關(guān)于在 Java 中使用 DynamoDBMapper 更新 DynamoDB 項目的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  How can I detect integer overflow on 32 bits int?(如何檢測 32 位 int 上的整數(shù)溢出?)
                  Local variables before return statements, does it matter?(return 語句之前的局部變量,這有關(guān)系嗎?)
                  How to convert Integer to int?(如何將整數(shù)轉(zhuǎn)換為整數(shù)?)
                  How do I create an int array with randomly shuffled numbers in a given range(如何在給定范圍內(nèi)創(chuàng)建一個隨機打亂數(shù)字的 int 數(shù)組)
                  Inconsistent behavior on java#39;s ==(java的行為不一致==)
                  Why is Java able to store 0xff000000 as an int?(為什么 Java 能夠?qū)?0xff000000 存儲為 int?)
                  <i id='rYpZo'><tr id='rYpZo'><dt id='rYpZo'><q id='rYpZo'><span id='rYpZo'><b id='rYpZo'><form id='rYpZo'><ins id='rYpZo'></ins><ul id='rYpZo'></ul><sub id='rYpZo'></sub></form><legend id='rYpZo'></legend><bdo id='rYpZo'><pre id='rYpZo'><center id='rYpZo'></center></pre></bdo></b><th id='rYpZo'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='rYpZo'><tfoot id='rYpZo'></tfoot><dl id='rYpZo'><fieldset id='rYpZo'></fieldset></dl></div>
                    • <legend id='rYpZo'><style id='rYpZo'><dir id='rYpZo'><q id='rYpZo'></q></dir></style></legend>
                        <tbody id='rYpZo'></tbody>
                        • <bdo id='rYpZo'></bdo><ul id='rYpZo'></ul>

                          1. <small id='rYpZo'></small><noframes id='rYpZo'>

                            <tfoot id='rYpZo'></tfoot>
                            主站蜘蛛池模板: 日韩有码一区 | 欧美亚洲国产一区二区三区 | 久久午夜视频 | 久久久久久毛片免费观看 | 成人午夜性成交 | 欧美xxxx性| 九九精品视频在线 | 盗摄精品av一区二区三区 | 成人影院免费视频 | 男女视频在线观看 | 国产日韩精品视频 | 欧美在线综合 | 99久久精品一区二区毛片吞精 | 一区二区福利视频 | 亚洲交性 | 国产精品一区二区三区四区 | 91香蕉视频在线观看 | 高清亚洲 | 春色av| 操射视频| 精品国产一区二区三区性色 | 亚洲日本欧美日韩高观看 | 成年人精品视频 | 国产成人精品免费视频 | 成人精品一区二区 | 一级毛片免费看 | 日韩中文字幕久久 | a级大片免费观看 | 亚洲国产精品一区二区久久 | 91网站在线观看视频 | 午夜精品一区二区三区在线观看 | 亚洲最大的成人网 | 97精品超碰一区二区三区 | 羞羞视频网站免费观看 | 91偷拍精品一区二区三区 | 日韩av大片免费看 | 中文字幕 亚洲一区 | 久久久久久久av | 欧美精品99 | 综合色播 | 免费成人高清 |