Class ResultImpl

  • All Implemented Interfaces:
    Result

    public class ResultImpl
    extends java.lang.Object
    implements Result
    A query result.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected Query query  
    • Field Detail

      • query

        protected final Query query
    • Method Detail

      • getColumnNames

        public java.lang.String[] getColumnNames()
        Description copied from interface: Result
        Get the list of column names.
        Specified by:
        getColumnNames in interface Result
        Returns:
        the column names
      • getColumnSelectorNames

        public java.lang.String[] getColumnSelectorNames()
        Description copied from interface: Result
        Get the distinct selector names of all columns. The list is ordered as selectors appear in the result. For columns without selector, an empty entry (null) is used.
        Specified by:
        getColumnSelectorNames in interface Result
        Returns:
        the distinct selector names
      • getSelectorNames

        public java.lang.String[] getSelectorNames()
        Description copied from interface: Result
        Get the list of selector names.
        Specified by:
        getSelectorNames in interface Result
        Returns:
        the selector names
      • getRows

        public java.lang.Iterable<? extends ResultRow> getRows()
        Description copied from interface: Result
        Get the rows.
        Specified by:
        getRows in interface Result
        Returns:
        the rows
      • getSize

        public long getSize()
        Description copied from interface: Result
        Get the number of rows, if known. If the size is not known, -1 is returned.
        Specified by:
        getSize in interface Result
        Returns:
        the size or -1 if unknown
      • getSize

        public long getSize​(Result.SizePrecision precision,
                            long max)
        Description copied from interface: Result
        Get the number of rows, if known. If the size is not known, -1 is returned.
        Specified by:
        getSize in interface Result
        Parameters:
        precision - the required precision
        max - the maximum number that should be returned (Long.MAX_VALUE for unlimited). For EXACT, the cost of the operation is at most O(max). For approximations, the cost of the operation should be at most O(log max).
        Returns:
        the (approximate) size. If an implementation does know the exact value, it returns it (even if the value is higher than max). If the implementation does not know the value, and the child node count is higher than max, it returns Long.MAX_VALUE.