Class QueryUtils


  • public class QueryUtils
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      QueryUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static SelectClause makeSelectStar​(java.lang.String tableName)
      Given a table name, this method constructs a query AST for the SQL "SELECT * FROM table".
      static SelectClause makeSelectStar​(java.lang.String tableName, Expression whereExpr)
      Given a table name and an optional WHERE predicate, this method constructs a query AST for the SQL "SELECT * FROM table [WHERE expr]".
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • QueryUtils

        public QueryUtils()
    • Method Detail

      • makeSelectStar

        public static SelectClause makeSelectStar​(java.lang.String tableName,
                                                  Expression whereExpr)
        Given a table name and an optional WHERE predicate, this method constructs a query AST for the SQL "SELECT * FROM table [WHERE expr]".
        Parameters:
        tableName - the name of the table to select from
        whereExpr - the predicate to use for selecting rows, or null if no predicate should be applied
        Returns:
        a query AST for selecting the rows from the table
      • makeSelectStar

        public static SelectClause makeSelectStar​(java.lang.String tableName)
        Given a table name, this method constructs a query AST for the SQL "SELECT * FROM table".
        Parameters:
        tableName - the name of the table to select from
        Returns:
        a query AST for selecting all rows from the table