Package edu.caltech.nanodb.queryast
Class QueryUtils
- java.lang.Object
-
- edu.caltech.nanodb.queryast.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]".
-
-
-
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 fromwhereExpr
- the predicate to use for selecting rows, ornull
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
-
-