AWS Dynamodb如何在iOS中批量使用对象映射器 [英] aws dynamodb how to use object mapper with batch get in ios

查看:114
本文介绍了AWS Dynamodb如何在iOS中批量使用对象映射器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用ios sdk从dynamodb获得约50个带有其主键的项。我可以通过AWSDynamoDB.defaultDynamoDB()。batchGetItem获取项目,但无法确定是否可以在响应中使用对象映射器。不幸的是,ios中的objectmapper类没有batchGet函数。据我所知,在这种情况下我不能使用查询。

I need to get ~50 items with their primary keys from dynamodb using ios sdk. i am able to get the items by AWSDynamoDB.defaultDynamoDB().batchGetItem but couldn't figure out if it is possible to use object mapper with the response. Unfortunately objectmapper class in ios doesn't have batchGet function. As far as i know i cant use query in this situation.

是否可以使用对象映射器?如果不是,那么哪个更有意义:解析响应以获取所需的类实例或在每个项目上调用objectMapper.load?

Is it possible to use object mapper? If not which one makes more sense: parsing the response to get the desired class instance or calling objectMapper.load on each item?

推荐答案

当前, AWSDynamoDBObjectMapper 不支持批量获取项。如果要使用对象映射器,则需要一次加载一项。

Currently, AWSDynamoDBObjectMapper does not support the batch get item. You need to load one item at a time if you want to use the object mapper.

这篇关于AWS Dynamodb如何在iOS中批量使用对象映射器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆