简体   繁体   English

当值不存在时,DynamoDBMapper 的查询方法返回什么?

[英]What does DynamoDBMapper's query method return when value doesn't exist?

Hi I'm trying to see if a value exist in my GSI and if it is return the query result or otherwise throw an error.您好,我正在尝试查看我的 GSI 中是否存在值,以及它是否返回查询结果或以其他方式抛出错误。 I was wondering if the query method from the DynamoDBMapper class is the right one to use and what it returns when a value doesn't exist?我想知道来自 DynamoDBMapper class 的查询方法是否是正确的使用方法,当值不存在时它返回什么? As it doesn't seem to say in their doc .正如他们的文档中似乎没有说的那样。 Thanks!谢谢!

All DynamoDB clients return an empty response if an item does not exist.如果项目不存在,所有 DynamoDB 客户端都会返回空响应。 It would not return an error because the request was successful, the item just did not exist.它不会返回错误,因为请求成功,该项目只是不存在。

From the docs :文档

A Query operation always returns a result set.查询操作总是返回一个结果集。 If no matching items are found, the result set will be empty.如果没有找到匹配项,则结果集将为空。 Queries that do not return results consume the minimum number of read capacity units for that type of read operation.不返回结果的查询会消耗该类型读取操作的最小读取容量单位数。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 FlutterFire - 如果 Firestore 查询 'result.exist' 在有结果时返回 true,那么如果没有结果,返回值是什么? - FlutterFire - If Firestore query 'result.exist' returns a true when there is a result, then what is the return value if no results? 如果数据库中不存在值,如何返回输入+字符串? - How to return input + string if value doesn't exist in DB? Firestore 查询有时在循环中不返回结果 - Firestore query doesn't return results sometimes when in a loop 如果用户的 email 和密码不匹配,其他代码将不会运行并返回错误。 但如果这样做,那么它将在谷歌 firebase 中正常工作 - If user's email and password doesn't match the other codes won't run and return an error. But if does, then it will work fine in google firebase 当对象不存在时,headObject 从不抛出错误 - headObject never throws an error when object doesn't exist Firebase 删除不存在的键时数据库不返回错误 - Firebase Database doesn't return error when removing a nonexistent key Firestore 查询不会返回带有 Geo flutter 火灾的附近位置 - Firestore query doesn't return nearby locations with Geo flutter fire CloudFront + S3 网站:应显示隐式索引文档时“指定的键不存在” - CloudFront + S3 Website: "The specified key does not exist" when an implicit index document should be displayed DynamoDB GSIs 查询找不到 GSI3 和 GSI4,尽管它们存在 - DynamoDB GSIs query doesn't find GSI3 & GSI4 despite they exist FirebaseAnimatedList 不返回任何内容 - FirebaseAnimatedList doesn't return anything
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM