Package io.github.torand.fastersql.order
Interface OrderExpression
- All Superinterfaces:
Sql
- All Known Subinterfaces:
AggregateFunction,ColumnFunction,SingleRowFunction
- All Known Implementing Classes:
Abs,Addition,Avg,Cast,Ceil,Column,ColumnAlias,ColumnPosition,ColumnRef,Concat,Count,CountAll,Division,Exp,Floor,Length,Ln,Lower,Max,Min,Modulo,Multiplication,Negate,Power,Round,Sqrt,Substring,Subtraction,Sum,ToChar,ToNumber,Upper
Defines an expression specifying the ordering of rows from a query.
-
Method Summary
Methods inherited from interface io.github.torand.fastersql.sql.Sql
aliasRefs, columnRefs, params, sql
-
Method Details
-
asc
Creates an ascending ordering of this expression.- Returns:
- the order clause.
-
desc
Creates a descending ordering of this expression.- Returns:
- the order clause.
-
ascIf
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.
-