Interface TableElement

    • Field Detail

      • YOU_CANNOT_DROP_A_COLUMN_THAT_BELONGS_TO

        static final String YOU_CANNOT_DROP_A_COLUMN_THAT_BELONGS_TO
        Constant YOU_CANNOT_DROP_A_COLUMN_THAT_BELONGS_TO.
        See Also:
        Constant Field Values
    • Method Detail

      • getGrain

        Grain getGrain()
        Returns grain that the table element belongs to.
        Returns:
      • getName

        String getName()
        Returns table element name.
        Returns:
      • getQuotedName

        String getQuotedName()
        Returns name in ANSI quotes ("name").
        Returns:
      • getQuotedNameIfNeeded

        String getQuotedNameIfNeeded()
        Returns the name in ANSI quotes if needed.
        Returns:
      • getColumns

        Map<String,​Column<?>> getColumns()
        Returns a map of columns with names.
        Returns:
      • getColumn

        Column<?> getColumn​(String colName)
                     throws ParseException
        Returns a column by its name or throws an exception with a message that the column is not found.
        Parameters:
        colName - column name
        Returns:
        Throws:
        ParseException - if a column with the specified name is not found in the table
      • addColumn

        void addColumn​(Column<?> column)
                throws ParseException
        Adds a column to the table.
        Parameters:
        column - new column
        Throws:
        ParseException - if the column couldn't be added
      • removeColumn

        void removeColumn​(Column<?> column)
                   throws ParseException
        Removes a column from the table.
        Parameters:
        column - existing column
        Throws:
        ParseException - if the column couldn't be removed
      • hasPrimeKey

        boolean hasPrimeKey()
        Whether the table has primary key.
        Returns:
      • getPkConstraintName

        String getPkConstraintName()
        Returns PK constraint name.
        Returns:
      • getPrimaryKey

        Map<String,​Column<?>> getPrimaryKey()
        Returns unmodified map of primary key columns.
        Returns:
        map of column name -> column