Class ViewManager

java.lang.Object
com.mckoi.database.ViewManager

public class ViewManager extends Object
A DatabaseConnection view manager. This controls adding, updating, deleting, and processing views inside the system view table.
Author:
Tobias Downer
  • Method Details

    • viewExists

      public boolean viewExists(TableName view_name)
      Returns true if the view with the given name exists.
    • defineView

      public void defineView(ViewDef view, SQLQuery query, User user) throws DatabaseException
      Defines a view. If the view with the name has not been defined it is defined. If the view has been defined then it is overwritten with this information.
      Parameters:
      view - information that defines the view.
      query - the query that forms the view.
      user - the user that owns this view being defined.
      Throws:
      DatabaseException
    • deleteView

      public boolean deleteView(TableName view_name) throws DatabaseException
      Deletes the view with the given name, or returns false if no entries were deleted from the view table.
      Throws:
      DatabaseException
    • createViewQueryPlanNode

      public QueryPlanNode createViewQueryPlanNode(TableName view_name)
      Returns a freshly deserialized QueryPlanNode object for the given view object.