当前位置: 首页 > news >正文

上海网站怎么备案做赚钱问卷调查的网站好

上海网站怎么备案,做赚钱问卷调查的网站好,wordpress 相关文章 插件,全球采购在上一篇文章中#xff0c;我们继续使用Java将项目插入DynamoDB。 DynamoDB还支持更新项目。 我们将使用Login表获取更新示例。 发布更新时#xff0c;必须指定要更新的项目的主键。 public void updateName(String email,String fullName) {MapString,AttributeValue… 在上一篇文章中我们继续使用Java将项目插入DynamoDB。 DynamoDB还支持更新项目。 我们将使用Login表获取更新示例。 发布更新时必须指定要更新的项目的主键。 public void updateName(String email,String fullName) {MapString,AttributeValue attributeValues new HashMap();attributeValues.put(email,new AttributeValue().withS(email));attributeValues.put(fullname,new AttributeValue().withS(fullName));UpdateItemRequest updateItemRequest new UpdateItemRequest().withTableName(TABLE_NAME).addKeyEntry(email,new AttributeValue().withS(email)).addAttributeUpdatesEntry(fullname,new AttributeValueUpdate().withValue(new AttributeValue().withS(fullName)));UpdateItemResult updateItemResult amazonDynamoDB.updateItem(updateItemRequest);} 我们可以使用条件更新来处理更高级的语句。 有条件的更新可以在很多情况下为我们提供帮助例如处理并发更新。 我们可以通过使用普通表达式来实现。 public void updateConditionallyWithExpression(String email,String fullName,String prefix) {MapString, AttributeValue key new HashMap();key.put(email, new AttributeValue().withS(email));MapString, AttributeValue attributeValues new HashMap();attributeValues.put(:prefix, new AttributeValue().withS(prefix));attributeValues.put(:fullname, new AttributeValue().withS(fullName));UpdateItemRequest updateItemRequest new UpdateItemRequest().withTableName(TABLE_NAME).withKey(key).withUpdateExpression(set fullname :fullname).withConditionExpression(begins_with(fullname,:prefix)).withExpressionAttributeValues(attributeValues);UpdateItemResult updateItemResult amazonDynamoDB.updateItem(updateItemRequest);} 或通过指定属性。 public void updateConditionallyWithAttributeEntries(String email, String fullName, String prefix){MapString,AttributeValue key new HashMap();key.put(email,new AttributeValue().withS(email));UpdateItemRequest updateItemRequest new UpdateItemRequest().withTableName(TABLE_NAME).withKey(key).addAttributeUpdatesEntry(fullname,new AttributeValueUpdate().withValue(new AttributeValue().withS(fullName)).withAction(AttributeAction.PUT)).addExpectedEntry(fullname,new ExpectedAttributeValue().withValue(new AttributeValue().withS(prefix)).withComparisonOperator(ComparisonOperator.BEGINS_WITH));UpdateItemResult updateItemResult amazonDynamoDB.updateItem(updateItemRequest);} 另一个功能是原子计数器。 我们可以发布DynamoDB项目的更新并增加属性值。 我们将添加一个额外的字段称为count。 另外我们将添加另一个更新功能。 一旦调用该函数将更新指定的字段但也会增加计数器属性。 因此counter属性将表示对特定项目执行了多少次更新。 public void addUpdateCounter(String email) {MapString,AttributeValue key new HashMap();key.put(email,new AttributeValue().withS(email));UpdateItemRequest updateItemRequest new UpdateItemRequest().withTableName(TABLE_NAME).withKey(key).addAttributeUpdatesEntry(counter,new AttributeValueUpdate().withValue(new AttributeValue().withN(0)).withAction(AttributeAction.PUT));UpdateItemResult updateItemResult amazonDynamoDB.updateItem(updateItemRequest);}public void updateAndIncreaseCounter(String email,String fullname) {MapString,AttributeValue key new HashMap();key.put(email,new AttributeValue().withS(email));UpdateItemRequest updateItemRequest new UpdateItemRequest().withTableName(TABLE_NAME).withKey(key).addAttributeUpdatesEntry(fullname,new AttributeValueUpdate().withValue(new AttributeValue().withS(fullname)).withAction(AttributeAction.PUT)).addAttributeUpdatesEntry(counter,new AttributeValueUpdate().withValue(new AttributeValue().withN(1)).withAction(AttributeAction.ADD));UpdateItemResult updateItemResult amazonDynamoDB.updateItem(updateItemRequest);} 您可以在github上找到源代码。 翻译自: https://www.javacodegeeks.com/2016/08/update-dynamodb-items-java.html
http://www.pierceye.com/news/964031/

相关文章:

  • 企业网站建设需要哪些费用做算法的网站
  • 很大气的网站 营销js特效网站展示
  • 南宁建站程序成都新线加网站建设
  • 用微软雅黑做网站可以吗wordpress游客发帖插件
  • 网站备案怎样提交管局网页电商设计
  • 郑州华恩科技做网站怎么样网络竞价推广托管公司
  • 都江堰住房和城乡建设厅网站哈尔滨网站建设方案维护
  • 九江网站网站建设原始传奇经典复古
  • 宽屏营销型网站源码安微省住房和城乡建设厅网站
  • 做暖视频网站免费搜索引擎营销的模式有
  • 网站建设需要的条件榆林北京网站建设
  • 分类信息网站推广的意义wordpress安装教程wamp
  • 免费自助建站全系统建设银行永泰支行网站
  • 建网络商城网站如何开公司做网站
  • 长春网站制作色块网站设计
  • 通明建设网站网站怎么黑
  • 学校网站怎么查询录取html5浏览器
  • 网站开发 技术问题页面模版 公众号
  • 宜阳县网站建设网络运营者应当为()
  • 做网站的人能看到浏览的人的信息吗青岛市最大的网络公司是哪里
  • 网站建设 千助黄冈网站推广软件ios
  • 网站制作视频教程全报价单模板表格
  • 包头市做网站哪个wordpress nginx伪静态规则
  • 深圳建网站哪家好专业网站建设服务包括
  • 做静态头像网站网站做百度竞价利于百度优化
  • 网站建设属于税收建立网站后怎样收费
  • 婚礼礼网站如何做的云南推广公司
  • 模板建站流程seo优化推广
  • 龙岗网络推广深圳网站建设我的世界的头怎么做视频网站
  • 高明网站建设首选公司深圳市建设安监站网站