Package: groovy.sql

## [Java] Class SqlOrderByVisitor

- groovy.sql.SqlOrderByVisitor

-     public class SqlOrderByVisitor
      extends Object

  Derives an SQL `ORDER BY` fragment from a simple sort closure, used by DataSet.

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public String` | `getOrderBy()` Returns the SQL `ORDER BY` fragment built so far.
    `` | `public void` | `visit(Statement code)` Appends the outermost referenced property name of each property access in the supplied closure body, in source order.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### public String getOrderBy()

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

      Returns:
        the derived order-by fragment

    - #### public void visit(Statement code)

      Appends the outermost referenced property name of each property access in the supplied closure body, in source order.

      Parameters:
        `code` - the sort closure body to inspect