目录

CouchDB特性

Find 特性

subfield 是数组的话不支持嵌套查询,意味着只能查询subfield 是单个值的

要想查询数组的属性得用$elemMatch,$allMatch,$allMatch 值可以是单个select也可以是数组select

以上是误解

Find 支持非常复杂的查询

大概像这样的结构

public class Select {

    private String fieldName;

    private List<Select> childSelects;

    private List<Criteria> criteria;

    private List<Combination> combinations;


}

public interface Combination<T> {

    CombinationOperator getOperator();

    T getValue();

}

combination子句中可以包含fieldName