Class AlterStatement


  • public final class AlterStatement
    extends Object
    Represents an "ALTER" sql statement.
    • Method Detail

      • table

        public AlterStatement table​(String tableName)
        Mark the statement to execute for the specified table.
        Parameters:
        tableName - the table you want to alter's name
        Returns:
        this instance for chaining
      • add

        public AlterStatement add​(String columnName,
                                  String type)
        Mark the statement to add a column with the specified column name and column type
        Parameters:
        columnName - name of the column you want to add
        type - type of the column you want to add
        Returns:
        this instance for chaining
      • dropColumn

        public AlterStatement dropColumn​(String columnName)
        Mark the statement to drop the column specified.
        Parameters:
        columnName - the column you want to drop's name
        Returns:
        this instance for chaining
      • alterColumn

        public AlterStatement alterColumn​(String columnName,
                                          String type)
        Make the statement to modify the specified column name's type to the specified new type.
        Parameters:
        columnName - the column's name you want to change the type
        type - the new type of the column
        Returns:
        this instance for chaining