Interface OrderExpression

All Superinterfaces:
Sql
All Known Subinterfaces:
AggregateFunction, ColumnFunction, SingleRowFunction
All Known Implementing Classes:
Abs, Addition, Avg, Ceil, Column, ColumnAlias, ColumnPosition, ColumnRef, Concat, Count, CountAll, Division, Floor, Length, Lower, Max, Min, Modulo, Multiplication, Round, Substring, Subtraction, Sum, ToChar, ToNumber, Upper

public interface OrderExpression extends Sql
Defines an expression specifying the ordering of rows from a query.
  • Method Summary

    Modifier and Type
    Method
    Description
    default Order
    asc()
    Creates an ascending ordering of this expression.
    default Order
    ascIf(boolean condition)
    Creates an ordering of this expression, based on a condition.
    default Order
    Creates a descending ordering of this expression.

    Methods inherited from interface io.github.torand.fastersql.sql.Sql

    aliasRefs, columnRefs, params, sql
  • Method Details

    • asc

      default Order asc()
      Creates an ascending ordering of this expression.
      Returns:
      the order clause.
    • desc

      default Order desc()
      Creates a descending ordering of this expression.
      Returns:
      the order clause.
    • ascIf

      default Order ascIf(boolean condition)
      Creates an ordering of this expression, based on a condition. If condition is true, an ascending ordering is created. If condition is false, a descending ordering is created.
      Parameters:
      condition - the condition.
      Returns:
      the order clause.