Skip to content

PlanStore

Chen Li edited this page Dec 16, 2016 · 8 revisions

Author(s): Seungjin Lee

Reviewer(s): Chen Li ** REVIEWED **

Synopsys

Implement a plan store for pre-defined plans. It manages plans using a table called plan and a directory plan_files. Plan records are stored in the table and the corresponding plan objects are stored as serialized objects under the directory. The purpose is to use stored plans to make it easier for users to formulate queries using the GUI.

Status

As of 12/16/2016: FINISHED

Modules

edu.uci.ics.textdb.planstore

Related Issues

https://github.com/TextDB/textdb/issues/256

Description

A table called plan and a directory plan_files are used in this module. The table has three attributes; name, description, and file_path, all of which are self-explanatory except file_path. The actual plan object for a given record is serialized as .ser file and stored where file_path indicates. This module deals with managing plan records and serializing/deserializing plan object files.

Set of public methods in this module is as follows.

  • void getInstance() : get the singleton instance of a plan store.
  • void createPlanStore() : create and initialize a plan store.
  • void destroyPlanStore() : delete both the table and the directory used in this module.
  • IDField addPlan(String planName, String description, LogicalPlan plan) : add a plan with the given name. All the arguments cannot be null.
  • ITuple getPlan(String planName) : get a plan record by the given name.
  • IDataReader getPlanIterator() : get a plan iterator to retrieve all the plan records stored.
  • void deletePlan(String planName) : delete a plan by the given name.
  • void updatePlan(String planName, LogicalPlan plan) : update the plan object of a plan by the given name.
  • void updatePlan(String planName, String description) : update the description of a plan by the given name.
  • void updatePlan(String planName, String description, LogicalPlan plan) : update both the plan object and the description of a plan by the given name
  • LogicalPlan readPlanObject(String filePath) : deserialize and fetch a plan object by the given path.

TODOs

  • Integrate this module with textdb-gui.
Clone this wiki locally