Package: groovy.sql

## [Java] Class SqlOrderByVisitor

- groovy.sql.SqlOrderByVisitor

-     public class SqlOrderByVisitor
      extends CodeVisitorSupport

  AST visitor used by DataSet to derive an SQL `ORDER BY` clause from a simple sort closure.

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public String` | `getOrderBy()` Returns the SQL `ORDER BY` fragment built so far.
    `` | `public void` | `visitPropertyExpression(PropertyExpression expression)` Appends the referenced property name as the next order-by term.
    `` | `public void` | `visitReturnStatement(ReturnStatement statement)` Visits the closure return expression that defines the sort key.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class CodeVisitorSupport` | `afterSwitchCaseStatementsVisited, afterSwitchConditionExpressionVisited, visitArgumentlistExpression, visitArrayExpression, visitAssertStatement, visitAttributeExpression, visitBinaryExpression, visitBitwiseNegationExpression, visitBlockStatement, visitBooleanExpression, visitBreakStatement, visitBytecodeExpression, visitCaseStatement, visitCastExpression, visitCatchStatement, visitClassExpression, visitClosureExpression, visitClosureListExpression, visitConstantExpression, visitConstructorCallExpression, visitContinueStatement, visitDeclarationExpression, visitDoWhileLoop, visitEmptyStatement, visitExpressionStatement, visitFieldExpression, visitForLoop, visitGStringExpression, visitIfElse, visitLambdaExpression, visitListExpression, visitMapEntryExpression, visitMapExpression, visitMethodCallExpression, visitMethodPointerExpression, visitMethodReferenceExpression, visitNotExpression, visitPostfixExpression, visitPrefixExpression, visitPropertyExpression, visitRangeExpression, visitReturnStatement, visitShortTernaryExpression, visitSpreadExpression, visitSpreadMapExpression, visitStaticMethodCallExpression, visitSwitch, visitSynchronizedStatement, visitTernaryExpression, visitThrowStatement, visitTryCatchFinally, visitTupleExpression, visitUnaryMinusExpression, visitUnaryPlusExpression, visitVariableExpression, visitWhileLoop`

- - ### Method Detail

    - #### public String getOrderBy()

      Returns the SQL `ORDER BY` fragment built so far.

      Returns:
        the derived order-by fragment

    - #### public void visitPropertyExpression(PropertyExpression expression)

      Appends the referenced property name as the next order-by term.

      Parameters:
        `expression` - the property expression to visit

    - #### public void visitReturnStatement(ReturnStatement statement)

      Visits the closure return expression that defines the sort key.

      Parameters:
        `statement` - the return statement to visit