Package groovy.sql

Class SqlOrderByVisitor

java.lang.Object
groovy.sql.SqlOrderByVisitor

public class SqlOrderByVisitor extends Object
Derives an SQL ORDER BY fragment from a simple sort closure, used by DataSet.
  • Constructor Details

    • SqlOrderByVisitor

      public SqlOrderByVisitor()
  • Method Details

    • visit

      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
    • getOrderBy

      public String getOrderBy()
      Returns the SQL ORDER BY fragment built so far.
      Returns:
      the derived order-by fragment