DynamoDB:包含所有过滤器

编程入门 行业动态 更新时间:2024-10-10 07:21:04
本文介绍了DynamoDB:包含所有过滤器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个模式,该模式的字段名为 ids (数字列表)

I have a schema with a field called ids (list of numbers)

如何创建一个 QuerySpec 来过滤包含指定列表的所有值的项目?

How can I create a QuerySpec to filter the items that contains all values of a specified list?

例如:

item 1: ids=[1,2,3] item 2: ids=[1,3,5]

我只需要检索项目1 当我按 [1,2]

我正在使用:

querySpec.withFilterExpression(包含(ids,:f1)和contains(ids,:f2))

但是我不知道它是否有效,或者是否有更方便的方法。

But I don't know if it is efficient or if there is a more convenient way to do it.

推荐答案

该值不能为SET,MAP或LIST。您必须使用 AND 运算符才能获得OP中提到的结果。

The value cannot be SET, MAP or LIST. You have to use AND operator to achieve the result as mentioned in the OP.

列表支持:在评估 a CONTAINS b时, a 可以是列表;但是, b不能是集合,地图或列表。

CONTAINS is supported for lists: When evaluating "a CONTAINS b", "a" can be a list; however, "b" cannot be a set, a map, or a list.

更多推荐

DynamoDB:包含所有过滤器

本文发布于:2023-10-12 04:12:39,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1483687.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:过滤器   DynamoDB

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!