Class Views

java.lang.Object
mindsdb.services.Views

public class Views extends Object
Views service class for handling views.
  • Constructor Details

    • Views

      public Views(Project project, RestAPI api)
      Constructor for Views
      Parameters:
      project - - Project object
      api - - RestAPI object
  • Method Details

    • list

      public List<View> list()
      List all views
      Returns:
      List of View objects
    • create

      public View create(String name, String sql)
      Create a new view
      Parameters:
      name - - name of the view
      sql - - SQL query for the view
      Returns:
      View object
    • create

      public View create(String name, Query query)
      Create a new view
      Parameters:
      name - - name of the view
      query - - Query object for the view
      Returns:
      View object
    • drop

      public void drop(String name)
      Drop a view
      Parameters:
      name - - name of the view
    • get

      public View get(String name)
      Get a view by name
      Parameters:
      name - - name of the view
      Returns:
      View object