Package org.h2.result

Class Row

  • All Implemented Interfaces:
    HasSQL, Typed
    Direct Known Subclasses:
    DefaultRow

    public abstract class Row
    extends SearchRow
    Represents a row in a table.
    • Constructor Detail

      • Row

        public Row()
    • Method Detail

      • get

        public static Row get​(Value[] data,
                              int memory)
        Creates a new row.
        Parameters:
        data - values of columns, or null
        memory - used memory
        Returns:
        the allocated row
      • get

        public static Row get​(Value[] data,
                              int memory,
                              long key)
        Creates a new row with the specified key.
        Parameters:
        data - values of columns, or null
        memory - used memory
        key - the key
        Returns:
        the allocated row
      • getValueList

        public abstract Value[] getValueList()
        Get values.
        Returns:
        values
      • hasSameValues

        public boolean hasSameValues​(Row other)
        Check whether values of this row are equal to values of other row.
        Parameters:
        other - the other row
        Returns:
        true if values are equal, false otherwise
      • hasSharedData

        public boolean hasSharedData​(Row other)
        Check whether this row and the specified row share the same underlying data with values. This method must return false when values are not equal and may return either true or false when they are equal. This method may be used only for optimizations and should not perform any slow checks, such as equality checks for all pairs of values.
        Parameters:
        other - the other row
        Returns:
        true if rows share the same underlying data, false otherwise or when unknown