本文整理了Java中com.mongodb.client.model.Filters.all()
方法的一些代码示例,展示了Filters.all()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Filters.all()
方法的具体详情如下:
包路径:com.mongodb.client.model.Filters
类名称:Filters
方法名:all
[英]Creates a filter that matches all documents where the value of a field is an array that contains all the specified values.
[中]创建一个筛选器,该筛选器匹配字段值为包含所有指定值的数组的所有文档。
代码示例来源:origin: org.mongodb/mongo-java-driver
/**
* Creates a filter that matches all documents where the value of a field is an array that contains all the specified values.
*
* @param fieldName the field name
* @param values the list of values
* @param <TItem> the value type
* @return the filter
* @mongodb.driver.manual reference/operator/query/all $all
*/
public static <TItem> Bson all(final String fieldName, final TItem... values) {
return all(fieldName, asList(values));
}
代码示例来源:origin: org.mongodb/mongodb-driver-core
/**
* Creates a filter that matches all documents where the value of a field is an array that contains all the specified values.
*
* @param fieldName the field name
* @param values the list of values
* @param <TItem> the value type
* @return the filter
* @mongodb.driver.manual reference/operator/query/all $all
*/
public static <TItem> Bson all(final String fieldName, final TItem... values) {
return all(fieldName, asList(values));
}
代码示例来源:origin: org.opencb.commons/commons-datastore-mongodb
break;
case ALL:
filter = Filters.all(mongoDbField, queryValues);
break;
default:
内容来源于网络,如有侵权,请联系作者删除!