Package com.mckoi.database.interpret
Class Planner
java.lang.Object
com.mckoi.database.interpret.Planner
Various methods for forming query plans on SQL queries.
- Author:
- Tobias Downer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic QueryPlanNode
formQueryPlan
(DatabaseConnection db, TableSelectExpression expression, com.mckoi.database.interpret.TableExpressionFromSet from_set, ArrayList order_by) Forms a query plan (QueryPlanNode) from the given TableSelectExpression and TableExpressionFromSet.static QueryPlanNode
planForOrderBy
(QueryPlanNode plan, ArrayList order_by, com.mckoi.database.interpret.TableExpressionFromSet from_set, ArrayList s_col_list) Plans an ORDER BY set.
-
Constructor Details
-
Planner
public Planner()
-
-
Method Details
-
formQueryPlan
public static QueryPlanNode formQueryPlan(DatabaseConnection db, TableSelectExpression expression, com.mckoi.database.interpret.TableExpressionFromSet from_set, ArrayList order_by) throws DatabaseException Forms a query plan (QueryPlanNode) from the given TableSelectExpression and TableExpressionFromSet. The TableSelectExpression describes the SELECT query (or sub-query), and the TableExpressionFromSet is used to resolve expression references.The 'order_by' argument is a list of ByColumn objects that represent an optional ORDER BY clause. If this is null or the list is empty, no ordering is done.
- Throws:
DatabaseException
-
planForOrderBy
public static QueryPlanNode planForOrderBy(QueryPlanNode plan, ArrayList order_by, com.mckoi.database.interpret.TableExpressionFromSet from_set, ArrayList s_col_list) throws DatabaseException Plans an ORDER BY set. This is given its own function because we may want to plan this at the end of a number of composite functions.NOTE: s_col_list is optional.
- Throws:
DatabaseException
-