simpledb.planner
Class Planner

java.lang.Object
  extended by simpledb.planner.Planner

public class Planner
extends Object

The object that executes SQL statements.

Author:
sciore

Constructor Summary
Planner(QueryPlanner qplanner, UpdatePlanner uplanner)
           
 
Method Summary
 Plan createQueryPlan(String qry, Transaction tx)
          Creates a plan for an SQL select statement, using the supplied planner.
 int executeUpdate(String cmd, Transaction tx)
          Executes an SQL insert, delete, modify, or create statement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Planner

public Planner(QueryPlanner qplanner,
               UpdatePlanner uplanner)
Method Detail

createQueryPlan

public Plan createQueryPlan(String qry,
                            Transaction tx)
Creates a plan for an SQL select statement, using the supplied planner.

Parameters:
qry - the SQL query string
tx - the transaction
Returns:
the scan corresponding to the query plan

executeUpdate

public int executeUpdate(String cmd,
                         Transaction tx)
Executes an SQL insert, delete, modify, or create statement. The method dispatches to the appropriate method of the supplied update planner, depending on what the parser returns.

Parameters:
cmd - the SQL update string
tx - the transaction
Returns:
an integer denoting the number of affected records


Copyright © 2011. All Rights Reserved.