Class Tables

java.lang.Object
mindsdb.services.Tables

public class Tables extends Object
Tables service class for handling tables.
  • Constructor Details

    • Tables

      public Tables(Database database, RestAPI api)
      Constructor for Tables
      Parameters:
      database - Database
      api - RestAPI
  • Method Details

    • list

      public List<MDBTable> list()
      List all tables in the database
      Returns:
      List of Table
    • get

      public MDBTable get(String tableName)
      Get a table by name
      Parameters:
      tableName - Name of the table
      Returns:
      Table
    • create

      public MDBTable create(String name, Query query, boolean replace)
      Create a table from a query
      Parameters:
      name - Name of the table
      query - Query to create the table from
      replace - Replace the table if it already exists
      Returns:
      Table
    • create

      public MDBTable create(String name, tech.tablesaw.api.Table df, Boolean replace)
      Create a table from a DataFrame
      Parameters:
      name - Name of the table
      df - DataFrame
      replace - Replace the table if it already exists
      Returns:
      Table
    • drop

      public void drop(String tableName)
      Drop a table by name
      Parameters:
      tableName - Name of the table