Class SqlTupleReader

    • Constructor Detail

    • Method Detail

      • isAllowHints

        public boolean isAllowHints()
      • setAllowHints

        public void setAllowHints​(boolean allowHints)
      • incrementEmptySets

        public void incrementEmptySets()
        Description copied from interface: TupleReader
        Indicates that there was an empty argument somewhere in the tuple.
        Specified by:
        incrementEmptySets in interface TupleReader
      • addLevelMembers

        public void addLevelMembers​(RolapLevel level,
                                    TupleReader.MemberBuilder memberBuilder,
                                    List<RolapMember> srcMembers)
        Description copied from interface: TupleReader
        Adds a hierarchy to retrieve members from.
        Specified by:
        addLevelMembers in interface TupleReader
        Parameters:
        level - level that the members correspond to
        memberBuilder - used to build new members for this level
        srcMembers - if set, array of enumerated members that make up this level
      • getCacheKey

        public Object getCacheKey()
        Description copied from interface: TupleReader
        Returns an object that uniquely identifies the Result that this TupleReader would return. Clients may use this as a key for caching the result.
        Specified by:
        getCacheKey in interface TupleReader
        Returns:
        Cache key
      • getEnumTargetCount

        public int getEnumTargetCount()
        Returns:
        number of targets that contain enumerated sets with calculated members
      • readMembers

        public TupleList readMembers​(DataSource dataSource,
                                     TupleList partialResult,
                                     List<List<RolapMember>> newPartialResult)
        Description copied from interface: TupleReader
        Performs the read.
        Specified by:
        readMembers in interface TupleReader
        Parameters:
        dataSource - source for reading tuples
        partialResult - partially cached result that should be used instead of executing sql query
        newPartialResult - if non-null, return the result of the read; note that this is a subset of the full return list
        Returns:
        a list of RolapMember
      • readTuples

        public TupleList readTuples​(DataSource jdbcConnection,
                                    TupleList partialResult,
                                    List<List<RolapMember>> newPartialResult)
        Description copied from interface: TupleReader
        Performs the read.
        Specified by:
        readTuples in interface TupleReader
        Parameters:
        jdbcConnection - Data source
        partialResult - List of rows from previous pass
        newPartialResult - Populated with a new list of rows
        Returns:
        a list of tuples
      • addLevelMemberSql

        protected void addLevelMemberSql​(SqlQuery sqlQuery,
                                         RolapLevel level,
                                         RolapCube baseCube,
                                         mondrian.rolap.SqlTupleReader.WhichSelect whichSelect,
                                         AggStar aggStar)
        Generates the SQL statement to access members of level. For example,
        SELECT "country", "state_province", "city"
         FROM "customer"
         GROUP BY "country", "state_province", "city", "init", "bar"
         ORDER BY "country", "state_province", "city"
        accesses the "City" level of the "Customers" hierarchy. Note that:
        • "country", "state_province" are the parent keys;
        • "city" is the level key;
        • "init", "bar" are member properties.
        Parameters:
        sqlQuery - the query object being constructed
        level - level to be added to the sql query
        baseCube - this is the cube object for regular cubes, and the underlying base cube for virtual cubes
        whichSelect - describes whether this select belongs to a larger
        aggStar - aggregate star if available
      • getEvaluator

        protected Evaluator getEvaluator​(TupleConstraint constraint)
        Obtains the evaluator used to find an aggregate table to support the Tuple constraint.
        Parameters:
        constraint - Constraint
        Returns:
        evaluator for constraint