Class Project

java.lang.Object
mindsdb.models.Project
Direct Known Subclasses:
Server

public class Project extends Object
Project class for handling project.
  • Constructor Details

    • Project

      public Project(RestAPI api, String name)
      Constructor for Project
      Parameters:
      api - - RestAPI object
      name - - name of the project
  • Method Details

    • getName

      public String getName()
      Get the name of the project
      Returns:
      name of the project
    • query

      public Query query(String sql)
      Create a Query object
      Parameters:
      sql - SQL string
      Returns:
      Query object
    • dropModelVersion

      public void dropModelVersion(String modelName, int version)
      Drop a model version
      Parameters:
      modelName - Name of the model
      version - Version of the model
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • listJobs

      public List<Job> listJobs()
      List all jobs
      Returns:
      list of Job objects
    • getJob

      public Job getJob(String name)
      Get a job by name
      Parameters:
      name - name of the job
      Returns:
      Job object
    • createJob

      public Job createJob(String name, String queryStr, LocalDateTime startAt, LocalDateTime endAt, String repeatStr, Integer repeatMin)
      Create a job
      Parameters:
      name - name of the job
      queryStr - query string
      startAt - start time
      endAt - end time
      repeatStr - repeat string
      repeatMin - repeat minutes
      Returns:
      Job object
    • createJob

      public Job createJob(String name)
      Create job with only name
      Parameters:
      name - name of the job
      Returns:
      Job object
    • createJob

      public Job createJob(String name, String queryStr)
      Create job with name and query string
      Parameters:
      name - name of the job
      queryStr - query string
      Returns:
      Job object
    • createJob

      public Job createJob(String name, String queryStr, LocalDateTime startAt, LocalDateTime endAt)
      Create job with name, query string, start time, and end time
      Parameters:
      name - name of the job
      queryStr - query string
      startAt - start time
      endAt - end time
      Returns:
      Job object
    • createJob

      public Job createJob(String name, String queryStr, LocalDateTime startAt, LocalDateTime endAt, String repeatStr)
      Create job with name, query string, start time, end time, and repeat string
      Parameters:
      name - name of the job
      queryStr - query string
      startAt - start time
      endAt - end time
      repeatStr - repeat string
      Returns:
      Job object
    • createJob

      public Job createJob(String name, List<String> queryStr)
      Create job with name and list of query strings
      Parameters:
      name - name of the job
      queryStr - list of query strings
      Returns:
      Job object
    • createJob

      public Job createJob(String name, List<String> queryStr, LocalDateTime startAt, LocalDateTime endAt)
      Create job with name, list of query strings, start time, and end time
      Parameters:
      name - name of the job
      queryStr - list of query strings
      startAt - start time
      endAt - end time
      Returns:
      Job object
    • createJob

      public Job createJob(String name, List<String> queryStr, LocalDateTime startAt, LocalDateTime endAt, String repeatStr)
      Create job with name, list of query strings, start time, end time, and repeat string
      Parameters:
      name - name of the job
      queryStr - list of query strings
      startAt - start time
      endAt - end time
      repeatStr - repeat string
      Returns:
      Job object
    • createJob

      public Job createJob(String name, List<String> queryStr, LocalDateTime startAt, LocalDateTime endAt, Integer repeatMin)
      Create job with name, list of query strings, start time, end time, and repeat minutes
      Parameters:
      name - name of the job
      queryStr - list of query strings
      startAt - start time
      endAt - end time
      repeatMin - repeat minutes
      Returns:
      Job object
    • listViews

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

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

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

      public View createView(String name, String sql)
      Create a view
      Parameters:
      name - name of the view
      sql - SQL string
      Returns:
      View object
    • dropView

      public void dropView(String name)
      Drop a view
      Parameters:
      name - name of the view
    • listModels

      public List<Model> listModels()
      List all models
      Returns:
      list of Model objects
    • listModelsWithVersion

      public List<ModelVersion> listModelsWithVersion(String name, Integer version)
      List all models with a specific name and version
      Parameters:
      name - name of the model
      version - version of the model
      Returns:
      list of ModelVersion objects
    • getModelWithVersion

      public ModelVersion getModelWithVersion(String name, int version)
      Get a model with a specific name and version
      Parameters:
      name - name of the model
      version - version of the model
      Returns:
      ModelVersion object
    • getModel

      public Model getModel(String name)
      Get a model by name
      Parameters:
      name - name of the model
      Returns:
      Model object
    • listKnowledgeBases

      public List<KnowledgeBase> listKnowledgeBases()
      List all knowledge bases
      Returns:
      list of KnowledgeBase objects
    • getKnowledgeBase

      public KnowledgeBase getKnowledgeBase(String name)
      Get a knowledge base by name
      Parameters:
      name - name of the knowledge base
      Returns:
      KnowledgeBase object