Class AbstractSchema

    • Field Detail

      • tables

        protected final List<Table> tables
        List of tables
    • Constructor Detail

      • AbstractSchema

        protected AbstractSchema​(com.exasol.db.Identifier name)
        Create a new database schema.
        Parameters:
        name - name of the database schema
    • Method Detail

      • getTables

        public List<Table> getTables()
        Description copied from interface: Schema
        Get the tables inside this schema.
        Specified by:
        getTables in interface Schema
        Returns:
        list of tables in this schema
      • createTable

        public Table createTable​(String name,
                                 String column1Name,
                                 String column1Type)
        Description copied from interface: Schema
        Create a table with one column.
        Specified by:
        createTable in interface Schema
        Parameters:
        name - name of the table
        column1Name - name of the first column
        column1Type - type of the first column
        Returns:
        table
      • createTable

        public Table createTable​(String name,
                                 String column1Name,
                                 String column1Type,
                                 String column2Name,
                                 String column2Type)
        Description copied from interface: Schema
        Create a table with two columns.
        Specified by:
        createTable in interface Schema
        Parameters:
        name - name of the table
        column1Name - name of the first column
        column1Type - type of the first column
        column2Name - name of the second column
        column2Type - type of the second column
        Returns:
        table
      • createTable

        public Table createTable​(String name,
                                 String column1Name,
                                 String column1Type,
                                 String column2Name,
                                 String column2Type,
                                 String column3Name,
                                 String column3Type)
        Description copied from interface: Schema
        Create a table with three columns.
        Specified by:
        createTable in interface Schema
        Parameters:
        name - name of the table
        column1Name - name of the first column
        column1Type - type of the first column
        column2Name - name of the second column
        column2Type - type of the second column
        column3Name - name of the third column
        column3Type - type of the third column
        Returns:
        table
      • createTableBuilder

        public Table.Builder createTableBuilder​(String name)
        Description copied from interface: Schema
        Create a builder for a table.

        In cases where you need a more complex table that can be created by the convenience methods createTable, this method provides a builder.

        Specified by:
        createTableBuilder in interface Schema
        Parameters:
        name - table name
        Returns:
        builder for the table
      • createTable

        public Table createTable​(String name,
                                 List<String> columnNames,
                                 List<String> columnTypes)
        Description copied from interface: Schema
        Create a table with an arbitrary number of columns.
        Specified by:
        createTable in interface Schema
        Parameters:
        name - name of the table
        columnNames - list of column names
        columnTypes - list of column types
        Returns:
        table
      • passColumnsToTableBuilder

        protected void passColumnsToTableBuilder​(List<String> columnNames,
                                                 List<String> columnTypes,
                                                 Table.Builder builder)
        Method that passes in a list of column names, and a list of their types, into a table builder.
        Parameters:
        columnNames - the column names
        columnTypes - the column types
        builder - the builder that gets the information passed in
      • getIdentifier

        protected abstract com.exasol.db.Identifier getIdentifier​(String name)
        Get an instance of Identifier.
        Parameters:
        name - identifier id
        Returns:
        instance of Identifier
      • drop

        public void drop()
        Description copied from interface: DatabaseObject
        Drop the database object and all contained objects.
        Specified by:
        drop in interface DatabaseObject