Class IndexColumnOrder

java.lang.Object
org.apache.derby.impl.sql.execute.IndexColumnOrder
All Implemented Interfaces:
Externalizable, Serializable, Formatable, TypedFormat, ColumnOrdering

public class IndexColumnOrder extends Object implements ColumnOrdering, Formatable
Basic implementation of ColumnOrdering. Not sure what to tell callers about 0-based versus 1-based numbering. Assume 0-based for now.
See Also:
  • Field Details

    • colNum

      int colNum
      This class implements Formatable. That means that it can write itself to and from a formatted stream. If you add more fields to this class, make sure that you also write/read them with the writeExternal()/readExternal() methods. If, inbetween releases, you add more fields to this class, then you should bump the version number emitted by the getTypeFormatId() method.
    • ascending

      boolean ascending
    • nullsOrderedLow

      boolean nullsOrderedLow
      indicate whether NULL values should sort low. nullsOrderedLow is usually false, because generally Derby defaults to have NULL values compare higher than non-null values, but if the user specifies an ORDER BY clause with a specification that indicates that NULL values should be ordered lower than non-NULL values, thien nullsOrderedLow is set to true.
  • Constructor Details

    • IndexColumnOrder

      public IndexColumnOrder()
      Niladic constructor for formatable
    • IndexColumnOrder

      public IndexColumnOrder(int colNum)
    • IndexColumnOrder

      public IndexColumnOrder(int colNum, boolean ascending)
    • IndexColumnOrder

      public IndexColumnOrder(int colNum, boolean ascending, boolean nullsLow)
      constructor used by the ORDER BY clause. This version of the constructor is used by the compiler when it processes an ORDER BY clause in a SQL statement. For such statements, the user gets to control whether NULL values are ordered as lower than all non-NULL values, or higher than all non-NULL values.
      Parameters:
      colNum - number of this column
      ascending - whether the ORDER BY is ascendeing or descending
      nullsLow - whether nulls should be ordered low
  • Method Details