类 AbstractFilterParams

    • 构造器详细资料

      • AbstractFilterParams

        public AbstractFilterParams​(String schemaName,
                                    String collectionName,
                                    boolean supportsOffset,
                                    boolean isRelational)
        Constructor.
        参数:
        schemaName - Schema name
        collectionName - Collection name
        supportsOffset - Whether offset is supported or not
        isRelational - Are relational columns identifiers allowed?
    • 方法详细资料

      • getOrder

        public Object getOrder()
        从接口复制的说明: FilterParams
        Get X Protocol Order objects.
        指定者:
        getOrder 在接口中 FilterParams
        返回:
        List of X Protocol Order objects
      • setOrder

        public void setOrder​(String... orderExpression)
        从接口复制的说明: FilterParams
        Parse order expressions into X Protocol Order objects.
         DocResult docs = this.collection.find().orderBy("$._id").execute();
         docs = this.collection.find().sort("$.x", "$.y").execute();
         
        指定者:
        setOrder 在接口中 FilterParams
        参数:
        orderExpression - order expressions
      • setLimit

        public void setLimit​(Long limit)
        从接口复制的说明: FilterParams
        Set maximum rows to find.

        For example, to find the 3 first rows:

         docs = this.collection.find().orderBy("$._id").limit(3).execute();
         
        指定者:
        setLimit 在接口中 FilterParams
        参数:
        limit - maximum rows to find
      • getOffset

        public Long getOffset()
        从接口复制的说明: FilterParams
        Get number of rows to skip before finding others.
        指定者:
        getOffset 在接口中 FilterParams
        返回:
        maximum rows to skip
      • setOffset

        public void setOffset​(Long offset)
        从接口复制的说明: FilterParams
        Set number of rows to skip before finding others.

        For example, to skip 1 row and find other 3 rows:

         docs = this.collection.find().orderBy("$._id").limit(3).skip(1).execute();
         
        指定者:
        setOffset 在接口中 FilterParams
        参数:
        offset - maximum rows to skip
      • supportsOffset

        public boolean supportsOffset()
        从接口复制的说明: FilterParams
        Whether offset clause is supported in the statement or not.

        Note that setting offset values is always possible, even if they are not supported.

        指定者:
        supportsOffset 在接口中 FilterParams
        返回:
        true if offset clause is supported
      • setCriteria

        public void setCriteria​(String criteriaString)
        从接口复制的说明: FilterParams
        Parse criteriaString into X Protocol Expr object.
         docs = this.collection.find("$.x1 = 29 | 15").execute();
         table.delete().where("age == 13").execute();
         
        指定者:
        setCriteria 在接口中 FilterParams
        参数:
        criteriaString - expression
      • getArgs

        public Object getArgs()
        从接口复制的说明: FilterParams
        Get binding arguments.
        指定者:
        getArgs 在接口中 FilterParams
        返回:
        List of X Protocol Scalar object
      • addArg

        public void addArg​(String name,
                           Object value)
        从接口复制的说明: FilterParams
        Set binding.
         this.collection.find("a = :arg1 or b = :arg2").bind("arg1", 1).bind("arg2", 2).execute();
         
        指定者:
        addArg 在接口中 FilterParams
        参数:
        name - bind key
        value - bind value
      • isRelational

        public boolean isRelational()
        从接口复制的说明: FilterParams
        Are relational columns identifiers allowed?
        指定者:
        isRelational 在接口中 FilterParams
        返回:
        true if allowed
      • setFields

        public abstract void setFields​(String... projection)
        从接口复制的说明: FilterParams
        Parse projection expressions into X Protocol Projection objects.
         collection.find().fields("CAST($.x as SIGNED) as x").execute();
         table.select("_id, name, birthday, age").execute();
         table.select("age as age_group, count(name) as cnt, something").execute();
         
        指定者:
        setFields 在接口中 FilterParams
        参数:
        projection - projection expression
      • getFields

        public Object getFields()
        从接口复制的说明: FilterParams
        Get X Protocol Projection objects.
        指定者:
        getFields 在接口中 FilterParams
        返回:
        List of X Protocol Projection objects.
      • setGrouping

        public void setGrouping​(String... groupBy)
        从接口复制的说明: FilterParams
        Parse groupBy expressions into X Protocol Expr objects.
         SelectStatement stmt = table.select("age as age_group, count(name) as cnt, something");
         stmt.groupBy("something", "age_group");
         
        指定者:
        setGrouping 在接口中 FilterParams
        参数:
        groupBy - groupBy expression
      • getGrouping

        public Object getGrouping()
        从接口复制的说明: FilterParams
        Get X Protocol Expr objects for groupBy.
        指定者:
        getGrouping 在接口中 FilterParams
        返回:
        List of X Protocol Expr objects
      • setGroupingCriteria

        public void setGroupingCriteria​(String having)
        从接口复制的说明: FilterParams
        Parse having expressions into X Protocol Expr objects.
         SelectStatement stmt = table.select("age as age_group, count(name) as cnt, something");
         stmt.groupBy("something", "age_group");
         stmt.having("cnt > 1");
         
        指定者:
        setGroupingCriteria 在接口中 FilterParams
        参数:
        having - having expression
      • getGroupingCriteria

        public Object getGroupingCriteria()
        从接口复制的说明: FilterParams
        Get X Protocol Expr objects for grouping criteria.
        指定者:
        getGroupingCriteria 在接口中 FilterParams
        返回:
        List of X Protocol Expr objects