Package org.h2.command.query

# Class QueryOrderBy

java.lang.Object
org.h2.command.query.QueryOrderBy

public class QueryOrderBy extends Object
Describes one element of the ORDER BY clause of a query.

## Field Summary

Fields
Modifier and Type
Field
Description
`Expression`
`columnIndexExpr`
The column index expression.
`Expression`
`expression`
The order by expression.
`int`
`sortType`
Sort type for this column.

## Constructor Summary

Constructors
Constructor
Description
`QueryOrderBy()`

## Method Summary

Modifier and Type
Method
Description
`void`
`getSQL(StringBuilder builder, int sqlFlags)`
Appends the order by expression to the specified builder.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### expression

public Expression expression
The order by expression.

### columnIndexExpr

public Expression columnIndexExpr
The column index expression. This can be a column index number (1 meaning the first column of the select list) or a parameter (the parameter is a number representing the column index number).

### sortType

public int sortType
Sort type for this column.

## Constructor Details

### QueryOrderBy

public QueryOrderBy()

## Method Details

### getSQL

public void getSQL(StringBuilder builder, int sqlFlags)
Appends the order by expression to the specified builder.

Parameters:
  `builder` - the string builder
  `sqlFlags` - formatting flags